1. Ronald Oussoren
  2. py2app
  3. Issues

Issues

Issue #119 invalid

Using pycurl in older Mac versions: "libcurl link-time version is older than compile-time version"

ompemi
created an issue

Hi!

It is not a bug at all, most likely it will my ignorance, but anyway I need some advice.

We have bundled our app with py2app without any problems at all until we add pycurl dependency. My build machine is 10.8 with libcurl 7.24.0, and the same version of pycurl. In all 10.8 it works fine.

When we try to run it on a 10.7.7 pycurl complains: "libcurl link-time version is older than compile-time version". Which seems normal as those machines has libcurl 7.21.4.

Is there a way to bundle the shared library which I am using? I would love to be fully standalone. Pyapp includes pycurl.so perfectly, but this shared library uses libcurl. I added frameworks = ['/usr/lib/libcurl.4.dylib'] in the options with no luck.

I am compiling an older version of libcurl+pycurl but anyway seems like a workaround, as I am supposing the older version I am supposed to support, limiting the compatibility of my app only by this library.

Do you have any suggestion?

Thanks a lot in advanced, Omar

PS: I would love to get rid of this dependency, but it is working really great for throttling requests

Comments (3)

  1. ompemi reporter

    I was very wrong trying to install from /usr/lib.

    I have install versions of libcurl in /usr/local/lib, but I do not manage to install pycurl using the appropiate libcurl I build in /usr/local. And when I try to hack around copying a libcurl.4.dylib to /usr/lib from and old curl version, I get another error in hdutil. All this is not releated to py2app so you can close the ticket.

    Just one question, Is the safest way to have compatibility with 10.6+ to have the build machine in 10.6?

  2. Ronald Oussoren repo owner

    The easiest way to get an application bundle that works on 10.6 or later is to build all extensions you use on a 10.6 machine. It is also possible to build extensions on a later release (I regularly do this myself), but then you need to be fairly careful to avoid using APIs that aren't available on 10.6 (either by linking with newer libraries, such as the libcurl problem you are having or by a configure script picking up new APIs).

    BTW. Adding "frameworks = ['/usr/lib/libcurl4.dylib']" does not work because py2app refuses to copy system libraries in application bundles. There are two reasons for that 1) it is unclear to me if copying would be safe w.r.t. licensing and 2) most libraries on OSX 10.X are build with a deployment target of 10.X and likely won't work on earlier OSX releases anyway.

    For pycurl you should be able to build libcurl in a temporary directory and force pycurl to use that (possibly by tweaking its setup.py file).

  3. Log in to comment