[Python-Dev] Extensions that depend on .so's on Solaris

Greg Wilson Greg.Wilson@baltimore.com
Thu, 1 Mar 2001 14:21:13 -0500


I'm working on Solaris, and have configured Python using
--with-cxx=g++.  I have a library "libenf.a", which depends
on several .so's (Eric Young's libeay and a couple of others).
I can't modify the library, but I'd like to wrap it so that
our QA group can write scripts to test it.

My C module was pretty simple to put together.  However, when
I load it, Python (or someone) complains that the symbols that
I know are in "libeay.so" are missing.  It's on LD_LIBRARY_PATH,
and "nm" shows that the symbols really are there.  So:

1. Do I have to do something special to allow Python to load
   .so's that extensions depend on?  If so, what?

2. Or do I have to load the .so myself prior to loading my
   extension?  If so, how?  Explicit "dlopen()" calls at the
   top of "init" don't work (presumably because the built-in
   loading has already decided that some symbols are missing).

Instead of offering a beer for the first correct answer this
time, I promise to write it up and send it to Fred Drake for
inclusion in the 2.1 release notes :-).

Thanks
Greg