[Distutils] Does anyone understand what's going on with libpython on Linux?

Nathaniel Smith njs at pobox.com
Mon Feb 8 01:13:31 EST 2016


On Sun, Feb 7, 2016 at 12:01 AM, Nathaniel Smith <njs at pobox.com> wrote:
> 2) if I ever embed cpython by doing dlopen("libpython2.7.so.1"), or
> dlopen("some_plugin_library_linked_to_libpython.so"), then the
> embedded cpython will not be able to load python extensions that are
> compiled in the Debian-style (but will be able to load python
> extensions compiled in the Fedora-style), because the dlopen() the
> loaded the python runtime and the dlopen() that loads the extension
> module create two different scopes that can't see each other's
> symbols. [I'm pretty sure this is right, but linking is arcane and
> probably I should write some tests to double check.]

Just to confirm, I did test this, and it is correct. Code at
https://github.com/njsmith/test-link-namespaces if anyone is curious.

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Distutils-SIG mailing list