Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

Bo Gus bogus at example.com
Wed Apr 26 19:34:35 EDT 2006


In article <mailman.5012.1146057004.27775.python-list at python.org>,
 Andrew MacIntyre <andymac at bullseye.apana.org.au> wrote:

> Dean wrote:
> > I've been trying to make python a dynamic library. I downloaded Python 
> > 2.4.3 Final from the Python web site and I cannot get it to create the 
> > library.
> > 
> > I've tried using the directive:
> > 
> > --enable-shared
> > 
> > and
> > 
> > --enable-shared=yes
> > 
> > and both of them had the same effect of creating a bunch of parts of 
> > the python interpreter in .so format but not in creating a single
> > libpython2.4.so.X.Y file. I could probably hack something together 
> > using ar but I would prefer to do it "correctly" by setting some 
> > options. I'm compiling under OpenBSD 3.5.
> 
> Well, I just confirmed that
> 
> ./configure --enable-shared
> 
> results in a libpython2.4.so.1 (and a libpython2.4.so) on FreeBSD 4.x.
> The result runs the regression test suite without significant problems
> (the test box didn't have a 2.4 installation).
> 
> A quick look at the configure script suggests that --enable-shared should
> work on OpenBSD.  While I believe that there's actually an OpenBSD based
> Python buildbot (though OpenBSD 3.[89] I think) running, I doubt that
> this configuration is tested there.
> 
> If you don't get any other responses, send me a copy of the full make log
> (ie "make >make.log 2>&1") and I'll compare it to the log from my test
> build.
Thanks for the help. It didn't build the shared library on its own but I 
did manage to find where it is built and a simple

make libpython2.4.so

Got it built for me. Thanks for the idea!

Dean



More information about the Python-list mailing list