469,898 Members | 1,837 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

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

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.

Apr 26 '06 #1
2 3438
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.

-------------------------------------------------------------------------
Andrew I MacIntyre "These thoughts are mine alone..."
E-mail: an*****@bullseye.apana.org.au (pref) | Snail: PO Box 370
an*****@pcug.org.au (alt) | Belconnen ACT 2616
Web: http://www.andymac.org/ | Australia
Apr 26 '06 #2
In article <ma***************************************@python. org>,
Andrew MacIntyre <an*****@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
Apr 26 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dave Harrison | last post: by
2 posts views Thread by Jerry LeVan | last post: by
reply views Thread by mrstephengross | last post: by
1 post views Thread by J. Jeffrey Close | last post: by
1 post views Thread by Daniel Nogradi | last post: by
3 posts views Thread by Micah Elliott | last post: by
5 posts views Thread by bearophileHUGS | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.