Problems with dynamic loading on Debian

Martin von Loewis loewis at informatik.hu-berlin.de
Tue Dec 4 09:28:42 EST 2001


Craig E Rasmussen <rasmussn at lanl.gov> writes:

> Has anyone seen this problem?  

The problem is that Python loads shared libraries using RTLD_LOCAL,
which means that symbols from one extension are not available to
another. This is by design; otherwise, extensions that have
overlapping symbol spaces by coincidence would not be possible (*).

> Can anyone suggest a solution?  

Do not use extension modules as shared libraries. If you want to
exchange information between them, use CObject instances.

In Python 2.2, you will be able to set the dlopen flags using
sys.setdlopenflags.

Regards,
Martin

(*) in one reported instance of this problem, some extension was using
a symbol name "initsocket", which unfortunately came from the socket
module. This, essentially, has caused the change in Python. Redhat, in
their 1.5.2 installation, reverted the change that already had been
made in Python.



More information about the Python-list mailing list