Christopher Warner Studies and thoughts, usually in coherent fashion.

16Mar/100

Pycurl on OSX

If you're trying to install pycurl 7.19.0 on OSX specifically (Darwin Kernel Version 10.2.0: Tue Nov  3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386) and are wondering why exactly it is failing. It's because setup calls curl-config which calls the static version of libcurl. Part of the problem here is that Apple's build of curl still references libcurl.a but they have seemingly removed the static library from 10.6.2. It's not stubbed or replaced by anything so the install fails. Another part of the problem is that pycurl is looking for a static library. I'm not going to get into a discussion on why using static libraries are nearly useless in most cases (even in embedded programming); except to say, static libraries are nearly useless in most nearly all cases; unless you know for sure you'll never, ever, ever, ever, ever until human kind has ended be upgrading the library. If you have that sort of vision and insight; i'd like for you to pick out some lotto numbers for me.

To fix replace lines 99-101 in setup.py with the following: libs = split_quoted(os.popen("'%s' --libs" % CURL_CONFIG).read())
I've reported to both Apple and the Pycurl mailing list.

[1]: http://pycurl.sourceforge.net/
[2]: http://people.redhat.com/drepper/no_static_linking.html