On 8-feb-2006, at 16:47, Gustavo J. A. M. Carneiro wrote:
gjc:/usr/lib/python2.4/lib-dynload$ ldd itertools.so libpthread.so.0 => /lib/libpthread.so.0 (0x00002aaaaabcc000) libc.so.6 => /lib/libc.so.6 (0x00002aaaaace2000) /lib/ld-linux-x86-64.so.2 (0x0000555555554000) gjc:/usr/lib/python2.4/lib-dynload$ It seems that Python C extension modules are not linking explicitly tolibpython. Yet, they explicitly reference symbols defined in libpython.When libpython is loaded in a global scope all is fine. However, when libpython is dlopen()ed with the RTLD_LOCAL flag, python C extensions always get undefined symbols.This problem happened recently with the nautilus-python package, whichinstalls an extension for the Nautilus file manager that allowsextensions in Python. For performance reasons, it now opens extensionswith RTLD_LOCAL flag, thus breaking python extensions. Any thoughts? Should I go ahead and open a bug report (maybe with patch), or is this controversial?
I don't know about Linux, but on OSX we don't link with libpython(or Python.framework) on purpose: this allows you to share extensions between several builds of the same version of Python. If you do link with libpython and extension that was compiled by a python installed at a different location will result in having two copies of libpython in memory, only one of which
is initialized. You end up with very interesting crashes. Ronald
-- Gustavo J. A. M. Carneiro <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> The universe is always one step beyond logic. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-devUnsubscribe: http://mail.python.org/mailman/options/python-dev/ ronaldoussoren%40mac.com
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com