Re: [C++-sig] Boost python in OS X, with non-framework python 2.4
I successfully built a large set of Boost.Python extensions under Mac OS 10.4 Intel with Python 2.3, 2.4, and 2.5, and under Mac OS 10.3 PPC with Python 2.3 and 2.5 (I bet 2.4 will also work, but I didn't try). I only managed to build successfully against Python frameworks. I don't know if it is possible to work with a normal/plain Python build as you get e.g. from fink. You can install a Python framework from sources like this: ./configure --enable-framework make make frameworkinstall For the last step you'll need to be root. The installation will go to "/Library/Frameworks/Python.Framework/Versions/2.?/" and "/Applications/MacPython 2.?", and you'll get a new set of softlinks in /usr/local. I'm using a scons-based build system, therefore I don't know how to convince bjam to use the Python installation you want. Hopefully someone else can help out. ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Hi Ralf, Thanks for the suggestion. Maybe I've been going about this the wrong way. I installed the OS X package for python 2.5. I then had a go at compiling boost python against framework python 2.5 (the one symlinked to current) on intel, but had compile errors. Every one was of the form: /Users/lars/Downloads/Work/boost_1_33_1/libs/python/build/../src/ object_protocol.cpp:139: error: invalid conversion from 'int*' to 'Py_ssize_t*' My guess is that part of the python interface changed between versions (this one type/typedef of Py_ssize_t?). I imagine that using a more recent dev version of boost python might get around this, so that's what I'll try now. It's comforting that you've been successful though. You wouldn't believe how much time I've spent trying to get this working. Lars
Ok, after some trouble, someone mentioned the command otool, and using otool -L I was able to debug some of my strange shared library problems, some of which were undoubtedly caused by trying too hard (many versions of python, many simultaneous installs of boost.python, frameworks, fink, darwinports...). I removed all the alternative versions of python and boost python, fully deleted the current install of boost python, and reinstalled it for framework python 2.4. I can now successfully build extensions on python 2.4, so I'm happy. Thanks for the help! Lars On 26/11/2006, at 3:34 PM, Ralf W. Grosse-Kunstleve wrote:
I successfully built a large set of Boost.Python extensions under Mac OS 10.4 Intel with Python 2.3, 2.4, and 2.5, and under Mac OS 10.3 PPC with Python 2.3 and 2.5 (I bet 2.4 will also work, but I didn't try).
I only managed to build successfully against Python frameworks. I don't know if it is possible to work with a normal/plain Python build as you get e.g. from fink.
You can install a Python framework from sources like this:
./configure --enable-framework make make frameworkinstall
For the last step you'll need to be root. The installation will go to "/Library/Frameworks/Python.Framework/Versions/2.?/" and "/Applications/MacPython 2.?", and you'll get a new set of softlinks in /usr/local.
I'm using a scons-based build system, therefore I don't know how to convince bjam to use the Python installation you want. Hopefully someone else can help out.
______________________________________________________________________ ______________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com _______________________________________________ C++-sig mailing list C++-sig@python.org http://mail.python.org/mailman/listinfo/c++-sig
participants (2)
-
Lars Yencken -
Ralf W. Grosse-Kunstleve