Unable to build libpython2.5.so on OS X 10.4

E

Eric Winter

Hi all. I'm trying to build some internal code that needs to link
against libpython2.5.so on a OS X 10.4 (Tiger) machine. It seems that
no matter what combination of options and environment variables I give
to the configure script from python 2.5.1, all I get is the
libpython2.5.a (the static library). I've googled the problem and
searched the comp.lang.python archives, but I have been unable to find
anything that works.

Is there some special magic I have to invoke to do this? I've not done
any Mac development, so there may be some obvious point I am missing.
The Python README file and configure script comments are not getting
me very far.

TIA,
Eric Winter
NASA GSFC
Fermi Gamma-Ray Space Telescope Science Support Center
 
E

elwinter

Christian,

Thanks for the response. I knew about the .dylib suffix, but that's
not being built either, even when I supply the --enable-shared option
to configure. I also tried the --enable-unicode configure option, but
no joy. Might there be some additional OS X package I need to install
to get this to work?

Thanks,
Eric
 
N

Ned Deily

Hi all. I'm trying to build some internal code that needs to link
against libpython2.5.so on a OS X 10.4 (Tiger) machine. It seems that
no matter what combination of options and environment variables I give
to the configure script from python 2.5.1, all I get is the
libpython2.5.a (the static library). I've googled the problem and
searched the comp.lang.python archives, but I have been unable to find
anything that works.

Perhaps I misunderstand, but if you are trying to build a C extension
for an existing Python 2.5 installation, using Distutils from that
installation should take care of everything for you. Is there a
setup.py file by any chance? Are you using a standard python
installation (i.e. python.org installer for instance)? More details
might help.
 
E

elwinter

Hi Ned. The Python module I am building is actually the Python module
for ROOT, a large package from CERN. However, the problem arises
before that code enters the picture, when I am building Python itself.
All I want to do is create "libpython2.5.dylib", or its equivalent,
and I can't seem to make that happen on Tiger.

Thanks,
Eric
 
N

Ned Deily

The Python module I am building is actually the Python module
for ROOT, a large package from CERN. However, the problem arises
before that code enters the picture, when I am building Python itself.
All I want to do is create "libpython2.5.dylib", or its equivalent,
and I can't seem to make that happen on Tiger.

Any chance you can use the python.org installer for 2.5.4? Or the
Macports version? They both are supported on Tiger.

<http://www.python.org/download/releases/2.5.4/>
<http://www.macports.org/>

Again, I may be missing something but libpythonx.x by itself is not very
useful, i.e. it's not your usual standalone lib. You'll almost
certainly need the whole python installation. There are a number of
ways to build python on OS X (google will find them or ask on the Mac
python sig) but, unless you have some special requirement, use an
existing python installation and build the ROOT Python module with that.
 
P

Piet van Oostrum

elwinter said:
e> Hi Ned. The Python module I am building is actually the Python module
e> for ROOT, a large package from CERN. However, the problem arises
e> before that code enters the picture, when I am building Python itself.
e> All I want to do is create "libpython2.5.dylib", or its equivalent,
e> and I can't seem to make that happen on Tiger.

The standard installer for Python 2.5.4 when installed on Tiger, will
contain a file libpython2.5.a which is a symbolic link to
/Library/Frameworks/Python.framework/Versions/2.5/Python, which
according to the file command, is a shared library. So it is not a
static library, despite of its name!
 

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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top