Re: python 2.7.x on MacOSX: failed dlopen() on .so's

Discussion in 'Python' started by Paul Smith, Nov 13, 2013.

  1. Paul Smith

    Paul Smith Guest

    Thanks for the response Ned!

    On Wed, 2013-11-13 at 14:40 -0800, Ned Deily wrote:
    > There shouldn't be any problems with what you are trying to do. It
    > works for me with Python 2.7.6 and pycrypto-2.6.1. Some suggestions:
    > - Avoid --enable-shared on OS X at least initially. There are too
    > many ways things can go wrong. If you've built with it, suggest
    > starting with a fresh Python source directory just to be sure.


    I've tried it with all three options: no flag, --disable-shared, and
    --enable-shared, and don't notice any difference in the results; even
    with --enable-shared I don't seem to get any shared libs created.

    > - Check the dynamic library dependencies of _struct. On OS X:
    >
    > otool -L /Users/build/python/lib/python2.7/lib-dynload/_struct.so


    I get a libgcc_s reference as well, since I'm building with GCC:

    /Users/build/python/lib/python2.7/lib-dynload/_struct.so:
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
    version 159.1.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
    version 1105.0.0)

    I wonder if using the GCC linker etc. is part of the problem?

    > - Make sure you are *really* building pycrypto and friends with your
    > Python and not with some other one.


    I'm pretty sure but I'll triple-check.

    The reason I've set PYTHONHOME is ultimately I need this installation to
    be relocatable. It's going to be shared across lots of different
    systems and they'll have the ability to copy it wherever they want.

    > - Check your other environment variables and make sure you are not
    > setting any DYLD_ or LD_ env variables.


    Hm; I am setting LD_LIBRARY_PATH to find the Python .so files. Does
    python figure out where to look for them by itself?

    Thanks for this info; I'll get back to you.
    Paul Smith, Nov 13, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Smith
    Replies:
    0
    Views:
    76
    Paul Smith
    Nov 13, 2013
  2. Ned Deily
    Replies:
    0
    Views:
    124
    Ned Deily
    Nov 13, 2013
  3. Ned Deily
    Replies:
    0
    Views:
    71
    Ned Deily
    Nov 13, 2013
  4. Ned Deily
    Replies:
    0
    Views:
    101
    Ned Deily
    Nov 14, 2013
  5. Ned Deily
    Replies:
    0
    Views:
    83
    Ned Deily
    Nov 14, 2013
Loading...

Share This Page