[C++-sig] How to compile latest Boost.Python on Mac OS X?

Girts Kalnins girtsk at latnet.lv
Fri Dec 23 10:40:52 CET 2005


I use Mac OS X 10.4.3, then installed ActivePython-2.4.2-248-macosx-powerpc.dmg.
When I tried to compile boost.python from version 1.33.1, it fails to link.
GCC version: i686-apple-darwin8-gcc-4.0.0; I also use prebuilt bjam.

The script I use:

*************************************************
#!/bin/sh
PYTHON_ROOT="/Library/Frameworks/Python.framework/Versions/2.4" ; export
PYTHON_ROOT
PYTHON_VERSION=2.4 ; export PYTHON_VERSION
PYTHON_LIB_PATH=2.4 ; export PYTHON_LIB_PATH

./bjam -sBUILD=release
*************************************************

Output:

administrators-computer:~/Sandbox/boost_1_33_1/libs/python/build testmaster$
./boom
...found 930 targets...
...updating 2 targets...
darwin-Link-DyLib-action
../../../bin/boost/libs/python/build/libboost_python.dylib/darwin/release/shared-linkable-true/libboost_python.dylib
ld: Undefined symbols:
_PyBool_FromLong
_PyCallable_Check
_PyErr_Clear

[..snipped..]

_PyNumber_Subtract
_PyNumber_Xor
_PyDict_GetItemString
_PyMethod_Type
/usr/bin/libtool: internal link edit command failed

************

>From error above looks like it can not find python library. On windows these
files are in PYTHON_ROOT\Libs; python.lib and such.

I also failed to build python from sources. the linker could not find __Py_Mac.

Do you have any ideas?

G'irts




More information about the Cplusplus-sig mailing list