[Python-Dev] Freeze and shared modules

M.-A. Lemburg mal@lemburg.com
Thu, 04 Apr 2002 15:27:14 +0200

"Martin v. Loewis" wrote:
> "M.-A. Lemburg" <mal@lemburg.com> writes:
> > Does anyone know which compiler/linker options have to be specified
> > to make frozen Python interpreters correctly import shared modules ?
> LINKFORSHARED should be the right set of options.

Thanks for the hint: freeze.py generates a Makefile which doesn't
use this symbol for linking. Adding it by hand fixes this 

I'll checkin a fix for it. 

> > Many of the mxCGIPython are running into this problem (the default
> > settings in Python or freeze seem to be wrong on this account) and
> > it got even worse with Python 2.2 where even the standard modules
> > are built shared rather than statically linked.
> Yes, building all extension modules as shared libraries is evil for
> freezing applications. I wish Linux distributors would recognize this
> and write proper Setup files, instead of relying on the default
> mechanism.

mxCGIPython comes with its own Modules/Setup file, so the
problem is slightly less important. 

I agree though that at least the standard modules which don't 
require additional setup.py configuration should be turned on 
again per default in Modules/Setup.

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
Company & Consulting:                           http://www.egenix.com/
Python Software:                   http://www.egenix.com/files/python/