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

2009-05-07 Thread 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
--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread Christian Heimes
Eric Winter schrieb:
 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.

You have to start with a clean plate and use the --enable-shared option
to configure:

make distclean
./configure --enable-unicode=ucs4 --enable-shared
make

That will give you a libpython2.5.dylib. The suffix for shared libraries
is .dylib on On Mac OS X, not .so!

Christian
--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread 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

On May 7, 11:45 am, Christian Heimes li...@cheimes.de wrote:
 Eric Winter schrieb:

  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.

 You have to start with a clean plate and use the --enable-shared option
 to configure:

 make distclean
 ./configure --enable-unicode=ucs4 --enable-shared
 make

 That will give you a libpython2.5.dylib. The suffix for shared libraries
 is .dylib on On Mac OS X, not .so!

 Christian

--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread Ned Deily
In article 
fde3b1d5-8a52-4ff1-9093-9ed470b4f...@g20g2000vba.googlegroups.com,
 Eric Winter elwin...@verizon.net wrote:
 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.

-- 
 Ned Deily,
 n...@acm.org

--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread 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

On May 7, 12:41 pm, Ned Deily n...@acm.org wrote:
 In article
 fde3b1d5-8a52-4ff1-9093-9ed470b4f...@g20g2000vba.googlegroups.com,
  Eric Winter elwin...@verizon.net wrote:

  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.

 --
  Ned Deily,
  n...@acm.org

--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread Ned Deily
In article 
0e05eca2-b460-4e01-aa54-cc1055f51...@q14g2000vbn.googlegroups.com,
 elwinter elwin...@verizon.net wrote:
 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.

-- 
 Ned Deily,
 n...@acm.org

--
http://mail.python.org/mailman/listinfo/python-list


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

2009-05-07 Thread Piet van Oostrum
 elwinter elwin...@verizon.net (e) wrote:

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!
e Thanks,
e Eric

e On May 7, 12:41 pm, Ned Deily n...@acm.org wrote:
 In article
 fde3b1d5-8a52-4ff1-9093-9ed470b4f...@g20g2000vba.googlegroups.com,
  Eric Winter elwin...@verizon.net wrote:
 
  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.
 
 --
  Ned Deily,
  n...@acm.org


-- 
Piet van Oostrum p...@cs.uu.nl
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: p...@vanoostrum.org
--
http://mail.python.org/mailman/listinfo/python-list