Author benson_basis
Recipients
Date 2003-10-30.01:36:23
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
We've been working with libraries that are loaded with 
dlopen (on Linux and Solaris, the land of ELF) and 
which, in turn, use the embedded python interpreter.

Due to the behavior of the dynamic linker, this would 
work much better if modules were, by default, linked 
with -lpython2.3 instead of just left with hanging 
undefined symbols. Here's why.

The main executable isn't linked with python, and none 
of it's direct dependents are. So, the python symbols 
aren't in the global namespace.

The dlopened library is linked with python. However, 
when the dlopened library dlopens the modules, the 
linux linker is not clever enough to allow the second-
order library to use symbols from its parent. (Solaris 
has such a feature, but not linux). So, one has to 
manually dlopen the python library with RTLD_GLOBAL 
to make it work.

If each module had a NEED for the python lib (via -l at 
linktime), all this would just work.

I've got some local patches to build_ext.py for this 
purpose, but it would be nice to have official support.
History
Date User Action Args
2007-08-23 14:17:56adminlinkissue832799 messages
2007-08-23 14:17:56admincreate