[Python-Dev] _PyImport_LoadDynamicModule questions
Martin v. Loewis
30 May 2002 09:06:55 +0200
Guido van Rossum <firstname.lastname@example.org> writes:
> > If you find that a "good" redesign requires a shared libpython, then
> > so be it - but I'm still quite fond of the "single executable"
> > appraoch, so preserving that would be even better.
> Why? I thought there was serious work underway to make libpython.so a
> reality on Linux?
It already is, with --enable-shared.
However, I still think that people creating --enable-shared
installations are misguided: You gain nothing (IMO), and you lose a
number of benefits:
- starting python will always require the dynamic linker to search for
the library, after the system already searched for the executable.
This will cause a number of extra stat calls. Together with the
need to produce PIC code, this will slow down Python.
- If Python is installed into a non-standard location (such as /usr/local
on Solaris), you will need additional trickery to find the shared
library. Even though the default installation achieves this trickery
with a -R option, the resulting binary is not relocatable anymore
to a different directory (or, the python binary, but libpython2.3.so