GNOME Bugzilla – Bug 329110
gst-python sets RTLD_GLOBAL when importing, but doesn't set it back
Last modified: 2006-01-30 13:00:00 UTC
There doesn't seem any reason why we should leave the dlopen flags including RTLD_GLOBAL and affect all subsequent imported modules. Attaching a patch.
Created attachment 58339 [details] [review] set dlopen flags back as we found them
The reason RTLD_GLOBAL was added during 0.8 was because plugins did not use to link to the all the libraries they used symbols from. For instance, the plugins assumed that the symbols in the core libraries were available. It seems to have changed during the 0.9 series, so I guess it's okay to remove it.
Not using RTLD_GLOBAL at all still seems to be problematic, as the bindings call functions from the libxml2 python wrappers directly, and they're not present in the global symbol table unless the libxml2 module is imported with RTLD_GLOBAL. We could trim down the usage of RTLD_GLOBAL only while we import libxml2, or switch to depending on lxml which seems to offer a CObject to retrieve function pointers from, as suggested in http://docs.python.org/ext/using-cobjects.html
2006-01-30 Edward Hervey <edward@fluendo.com> * configure.ac: * gst/Makefile.am: Link against Gst Data protocol libraries. * gst/__init__.py: Restore dlopenflags after importing gst. Closes #329110