Re: How to Configure Dynamic Loading in AIX, Linux?

Andrew KUCHLING (fnord@binkley.cs.mcgill.ca)
20 Jan 1995 14:29:23 GMT

R Lindsay Todd (toddr@narnia.its.rpi.edu) wrote:
: Could someone who has done this share the magic incantations needed?

Linux requires that you use the GNU DLD library. The stages
of using dynamic libraries on Linux are:

1) Get dld from sunsite or some other Linux site. I believe
the version number is 3.2.4. Be careful here; the most recent GNU
version is 3.2.3, and doesn't support Linux; be sure to get it from a
Linux mirror, not a GNU mirror. Compile it and install the library
libdld.a somewhere; I used /usr/local/lib.

2) Get Jack Jansen's DL library; its location is given in the
_Extending Python_ manual as ftp://ftp.cwi.nl/pub/dynload/. Compile
it and install libdl.a wherever you put libdld.a.

3) Run Python's configure script, giving it the --with-dl-dld
option, which requires a parameter giving the directory where you put
the libraries.

4) Recompile Python.

If you run into trouble with this, send me some mail and we
can work on the problem.

: Does one need ELF support in Linux to do this? (Or does the technique
: vary depending on whether or not one has ELF support?)

I don't use ELF binaries, because I'd rather wait until
everything is reliable; my current impression (and please correct me
if I'm wrong) is that gcc-elf is still a bit wonky, and you have to
compile the entire GNU library yourself. I'd much rather wait until
ELF is a more standard part of Linux distributions. I suspect that
once ELF is common, Python's configure script will pick up the dlfcn.h
header file and dynamic linking will work automatically. Time will
tell, however...

Andrew Kuchling
fnord@binkley.cs.mcgill.ca