This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients dstufft, eric.araujo, loewis, ncoghlan, pitrou
Date 2014-05-19.18:50:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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: 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:02pitrousetrecipients: + pitrou, loewis, ncoghlan, eric.araujo, dstufft
2014-05-19 18:50:02pitrousetmessageid: <>
2014-05-19 18:50:02pitroulinkissue21536 messages
2014-05-19 18:50:00pitroucreate