dynamic loading of python modules on AIX

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Mon, 21 Feb 1994 13:40:02 -0500

I have a beta version of import.c for dynamic loading of python modules
built as shared object libraries on IBM AIX.

This does not use Jens-Uwe Mager's libdl, but uses AIX's native load()
and loadquery() routines ( although I have cribbed from Mager's
caterr routine to translate libquery's error numbers into error
strings.

I still haven't figured out all of the interactions with the AIX
linker commands ( but I can tell you the necessary switches to build.)

It appears to be somewhat position dependent - it will work if you
do it from the *RIGHT* directory - this also may have something to do
with the pointers in the import/export link files, or it may have to
do with proper environment settings ( but I don't think the latter:
import finds where the module is along $PYTHONPATH, and hands load()
a complete filename path, so it *shouldn't* depend on $LIBPATH )
Since I'm not sure of the cause of the problem, I can't tell you
the rule for determining the *RIGHT* directory! :-(

The error messages need some more work - but, again - I can't make
them more explicit until I understand what all of the problems are.

If anyone wants to give it a try, drop me a line and I'll email
you a copy of import.c and build instructions. I'ld like to get
these kinks worked out and get it well tested before I ask Guido
to include it in the next version.

And, BTW: I *still* haven't figured out how to get the shared code
linked with the RIGHT (i.e. modsupport's ) getargs. This is a
MAJOR problem with the usefullness of the modifications, but
this problem will NOT involve changing the build instructions
for python, only for the external loadable object module.

- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics