[Python-Dev] Problems with Python's default dlopen flags

David Abrahams David Abrahams" <david.abrahams@rcn.com
Sat, 4 May 2002 10:51:35 -0500


----- Original Message -----
From: "Gisle Aas" <gisle@ActiveState.com>


> You should take a look at how pyperl does it.  It uses a stub loader
> that python itself end up loading on 'import perl' and then this stub
> loader loads the real module with RTLD_GLOBAL.
>
> The stub loader is 'dlhack.c'.  Get the source from
> http://downloads.activestate.com/Zope-Perl/pyperl-1.0.1.tar.gz

AFAICT, this is what I meant when I wrote:

"Are you suggesting that in order to do this, my users need to add yet
another .so, a thin layer between Python and the guts of their extension
modules?"

There biggest problem with this arrangement is that my users are
creating lots of extension modules. Each one would require a seperate
stub loader, thereby doubling the number of shared objects they need to
create, complicating distribution and the build process.

I'm not familiar with pyperl, but from the source it looks like there's
just one Python extension module in this case (perl.so), so the same
problems may not apply.

-Dave