Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #59363

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

Subject Re: python 2.7.x on MacOSX: failed dlopen() on .so's
From Paul Smith <paul@mad-scientist.net>
Date 2013-11-13 17:59 -0500
References <1384370183.3496.472.camel@pdsdesk> <nad-E7CC3B.14401113112013@news.gmane.org>
Organization GNU's Not UNIX!
Newsgroups comp.lang.python
Message-ID <mailman.2566.1384387394.18130.python-list@python.org> (permalink)

Show all headers | View raw


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.

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: python 2.7.x on MacOSX: failed dlopen() on .so's Paul Smith <paul@mad-scientist.net> - 2013-11-13 17:59 -0500

csiph-web