Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 329987

Summary: dev-python/pycurl: ssl-related problems
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: Python Gentoo Team <python>
Status: RESOLVED FIXED    
Severity: normal CC: bugs+gentoo, cyrius, dragonheart, gef.kornflakes, hilco.wijbenga, kripton, m.debruijne, marienz, pcmoore, ronan, strowi
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=433762
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 361315, 407073, 415251    
Attachments: Build log
added gcrypt linking dependency

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-26 22:18:43 UTC
It fails to properly build when using NSS for the SSL support (see attached build log, there's a warning about it); when using GnuTLS instead it fails to link to libgcrypt (yes it works transitive, but it's better to link to it directly since it uses it directly!). Finally, you *have* to rebuild pycurl whenever you switch between openssl/gnutls/nss/nossl in curl itself...

Have fun.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2010-07-26 22:18:57 UTC
Created attachment 240227 [details]
Build log
Comment 2 Philipp Riegger 2011-02-21 10:23:30 UTC
Since this bug is named "multiple problems" and not "multiple ssl problems", here is another one:

For me pycurl did not compile with net-misc/curl[-static-libs]. So this dependency needs to be fixed.
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-21 11:59:16 UTC
(In reply to comment #2)

It's unrelated and already fixed.
Comment 4 Kfir Lavi 2012-02-17 21:40:41 UTC
Created attachment 302299 [details]
added gcrypt linking dependency

net-libs/gnutls-2.12.16 when nettle use flag is used, is not linked against libgcrypt.so so pycrypt needs to do it in linkage time.
Comment 5 Kfir Lavi 2012-02-17 21:44:45 UTC
Hi,
I modified pycurl-7.19.0-linking.patch to add -lgcrypt to compile commands of pycurl. 

I got the problem when running virt-install:
goofy # virt-install
Traceback (most recent call last):
  File "/usr/bin/virt-install-2.7", line 31, in <module>
    import urlgrabber.progress as progress
  File "/usr/lib/python2.7/site-packages/urlgrabber/__init__.py", line 54, in <module>
    from grabber import urlgrab, urlopen, urlread
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 427, in <module>
    import pycurl
ImportError: /usr/lib/python2.7/site-packages/pycurl.so: undefined symbol: gcry_control

I'm not sure if this should be changed in gnutls or here in pycurl. 
But for now this patch solves the pycurl undefined symbol. 

Regards,
Kfir
Comment 6 Bignaux Ronan 2012-03-12 15:42:46 UTC
modified pycurl-7.19.0-linking.patch seems to fix the bug in a appropriate way.
Comment 7 barrie backhurst 2012-04-13 07:23:03 UTC
If possible this patch should be pushed to portage ASAP, it is causing bug #407073 and #410885 and also the related forum thread

http://forums.gentoo.org/viewtopic-p-7011982.html?sid=b8fe461e5d414baf2808210859a3a427#7011982
Comment 8 Michal Privoznik 2012-04-18 19:24:56 UTC
I can confirm this bug is still present and attachment 302299 [details] fixes it.
Comment 9 Jesus Rivero (RETIRED) gentoo-dev 2012-04-18 21:45:03 UTC
+  18 Apr 2012; Jesus Rivero <neurogeek@gentoo.org>
+  files/pycurl-7.19.0-linking.patch:
+  Modified patch to account for curl USE flag mixture: ssl nss gnutls. Closes
+  bug #329987
+

I've modified existing patch to account for some things. Added -lgrypt when curl is compiled with gnutls support, also, added an extra check for -lssl3 as dev-libs/nss provides libssl3 and not libssl, which was making pycurl not recognize the library used when curl was compiled with the nss USE flag.

I think this closes this bug. Just REOPEN if problem persists.
Comment 10 Cyrius 2012-04-23 10:13:41 UTC
Problem is persisting for me.
I have adapted the patch to permit the compilation of printing stuff.
Then we really need the gcrypt library within pycurl.
Please Re open it.
Comment 11 Johannes Huber (RETIRED) gentoo-dev 2012-05-10 09:27:15 UTC
Reopened patch was changed without revision bump :-/ see bug #415251.(In reply to 

comment #10)
> Problem is persisting for me.
> I have adapted the patch to permit the compilation of printing stuff.
> Then we really need the gcrypt library within pycurl.
> Please Re open it.

And request for re open additionally.
Comment 12 Marien Zwart (RETIRED) gentoo-dev 2012-06-13 11:21:46 UTC
curl-7.19.0-r1 should improve matters, can you please test and reopen if it does not?
Comment 13 Marien Zwart (RETIRED) gentoo-dev 2012-06-13 11:22:27 UTC
*** Bug 408821 has been marked as a duplicate of this bug. ***