Logged In: YES
user_id=21627
That's a bug in the Debian package. Debian uses the patch
--- python2.1-2.1.2.orig/Python/dynload_shlib.c
+++ python2.1-2.1.2/Python/dynload_shlib.c
@@ -87,7 +87,7 @@
#ifdef RTLD_NOW
/* RTLD_NOW: resolve externals now
(i.e. core dump now if some are missing) */
- handle = dlopen(pathname, RTLD_NOW);
+ handle = dlopen(pathname, RTLD_NOW | RTLD_GLOBAL);
#else
if (Py_VerboseFlag)
printf("dlopen(\"%s\", %d);\n", pathname,
which results in exactly this behaviour. Please report the
bug to them; it works fine in the standard Python 2.1
distribution.
They claim that this "solves" bug debbug:97146, and that it
is a good thing to copy that strategy from Redhat. This is
foolish; the use of RTLD_GLOBAL has been stopped since
Python 1.5.2 precisely to avoid the problem you are now
seeing, and Redhat should have never changed the Python
source in that way.
Any library that relies on RTLD_GLOBAL needs to be fixed
(through exposure of CAPI objects); any application that
relies on RTLD_GLOBAL can use sys.setdlopenflags (available
since Python 2.2).
|