Message218806
When a C extension is built (using distutils) with a shared library Python, it cannot be loaded with an otherwise identical statically linked Python. The other way round works fine. Trivial example using the _ssl module:
>>> import sys
>>> sys.path.insert(0, '/home/antoine/cpython/shared/build/lib.linux-x86_64-3.5/')
>>> import _ssl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory
This is probably because of an additional -L flag that is passed when linking a C extension with a shared library Python. I don't think the flag is useful under Linux (or perhaps under any other OS at all), since the relevant symbols are already loaded when the interpreter tries to load the C extension.
(AFAIK, systems notorious for providing shared library Pythons are RedHat-alike systems, while Debian/Ubuntu provide statically linked Pythons) |
|
Date |
User |
Action |
Args |
2014-05-19 18:50:02 | pitrou | set | recipients:
+ pitrou, loewis, ncoghlan, eric.araujo, dstufft |
2014-05-19 18:50:02 | pitrou | set | messageid: <1400525402.57.0.75792320709.issue21536@psf.upfronthosting.co.za> |
2014-05-19 18:50:02 | pitrou | link | issue21536 messages |
2014-05-19 18:50:00 | pitrou | create | |
|