Minimum set of libraries for dynamic linking?

Allan M. Wind allanwind at
Mon Dec 3 14:11:22 CET 2001

How does one under Linux determine the minimum set of libraries needed
for dynamicly linking a program with an embedded python (2.2)
interpreter (library)?  I understand that missing symbols will cause the
link process to fail, but there seem to be cases where my program links
but segmentation fail when I do anything interesting?

I would like to understand the _method for finding the set of libraries_
rather than just a working set which I got from Demo/embed/Makefile
(with LIBPYTHON replaced with the .so version):

LIBPYTHON=      $(blddir)/libpython$(VERSION).a
LIBS=           -lnsl -ldl -lreadline -ltermcap -lieee -lpthread -lutil
LDFLAGS=        -Xlinker -export-dynamic
SYSLIBS=        -lm

e.g. are one supposed to match the libraries for (say,
found via ldd for instance) or the python binary itself?  Or should it
really work if the thing link?

Thanks in advance for your insight,

Allan M. Wind			email: allanwind at
P.O. Box 2022			finger: awind at (GPG/PGP)
Woburn, MA 01888-0022
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list