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

D

Dean

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.

Thanks for any advice.
 
A

Andrew MacIntyre

Dean said:
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.
 
B

Bo Gus

Andrew MacIntyre said:
Dean said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top