[Python-Dev] [email@example.com: Our application doesn't work with Debian packaged Python]
Guido van Rossum
Tue, 16 Jan 2001 23:16:48 -0500
> This message was on the debian-python list. Does anyone know why
> the patch is needed?
> - handle = dlopen(pathname, RTLD_LAZY);
> + handle = dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL);
This comes back every once in a while. It means that they have an
module whose shared library implementation exports symbols that are
needed by another shared library (probably another module).
IMO this approach is evil, because RTLD_GLOBAL means that *all*
external symbols defined by any module are exported to all other
shared libraries, and this will cause conflicts if the same symbol is
exported by two different modules -- which can happen quite easily.
(I don't know what happens on conflicts -- maybe you get an error,
maybe it links to the wrong symbol.)
The proper solution would be to put the needed entry points beside the
init<module> entry point in a separate shared library. But that's
often not how quick-and-dirty extension modules are designed...
--Guido van Rossum (home page: http://www.python.org/~guido/)