Boost logo

Boost Users :

Subject: [Boost-users] Boost python refuses to compile on OSX
From: Pim Schellart (P.Schellart_at_[hidden])
Date: 2009-04-19 06:13:28


Dear Users/Developers,

I followed the instructions on http://www.boost.org/doc/libs/1_38_0/libs/python/doc/building.html
  to install and build the boost python library.
When running the command bjam toolset=gcc --verbose-test test from
the /usr/local/boost_1_38_0/libs/python/example/quickstart directory I
get the following output (a bit long I know :)):

...patience...
...patience...
...found 1356 targets...
...updating 54 targets...
common.mkdir bin
common.mkdir bin/test_ext.test
common.mkdir bin/test_ext.test/gcc-4.0.1
common.mkdir bin/test_ext.test/gcc-4.0.1/debug
common.mkdir bin/gcc-4.0.1
common.mkdir bin/gcc-4.0.1/debug
gcc.compile.c++ bin/gcc-4.0.1/debug/extending.o
common.mkdir ../../../../bin.v2
common.mkdir ../../../../bin.v2/libs
common.mkdir ../../../../bin.v2/libs/python
common.mkdir ../../../../bin.v2/libs/python/build
common.mkdir ../../../../bin.v2/libs/python/build/gcc-4.0.1
common.mkdir ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
numeric.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
list.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
long.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
dict.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
tuple.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
str.o
../../../../libs/python/src/str.cpp: In function
‘boost::python::ssize_t
boost::python::detail::<unnamed>::str_size_as_py_ssize_t(size_t)’:
../../../../libs/python/src/str.cpp:29: warning: comparison between
signed and unsigned integer expressions
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
slice.o
common.mkdir ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/from_python.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/registry.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/type_id.o
common.mkdir ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/object
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/enum.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/class.o
../../../../libs/python/src/object/class.cpp: In function
‘boost::python::api::object
boost::python::objects::<unnamed>::new_class(const char*, size_t,
const boost::python::type_info*, const char*)’:
../../../../libs/python/src/object/class.cpp:510: warning: comparison
between signed and unsigned integer expressions
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/function.o
../../../../libs/python/src/object/function.cpp: In member function
‘PyObject* boost::python::objects::function::call(PyObject*,
PyObject*) const’:
../../../../libs/python/src/object/function.cpp:169: warning:
comparison between signed and unsigned integer expressions
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/inheritance.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/life_support.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/pickle_support.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
errors.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
module.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/builtin_converters.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/arg_to_python_base.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/iterator.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/stl_iterator.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object_protocol.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object_operators.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
wrapper.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
import.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
exec.o
gcc.compile.c++ ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object/function_doc_signature.o
gcc.link.dll ../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
libboost_python-gcc40-d-1_38.dylib
ld: unknown option: -R
collect2: ld returned 1 exit status

     "g++" -L"/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib" -L"/Applications/scisoft/i386/
Packages/Python-2.5.2/Python.framework/Versions/2.5/lib/python2.5/
config" -Wl,-R -Wl,"/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib" -Wl,-R -Wl,"/Applications/scisoft/
i386/Packages/Python-2.5.2/Python.framework/Versions/2.5/lib/python2.5/
config" -o "../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
libboost_python-gcc40-d-1_38.dylib" -Wl,-h -Wl,libboost_python-gcc40-
d-1_38.dylib -shared -Wl,--start-group "../../../../bin.v2/libs/python/
build/gcc-4.0.1/debug/numeric.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/list.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/long.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/dict.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/tuple.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/str.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/
debug/slice.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/from_python.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/converter/registry.o" "../../../../bin.v2/libs/python/
build/gcc-4.0.1/debug/converter/type_id.o" "../../../../bin.v2/libs/
python/build/gcc-4.0.1/debug/object/enum.o" "../../../../bin.v2/libs/
python/build/gcc-4.0.1/debug/object/class.o" "../../../../bin.v2/libs/
python/build/gcc-4.0.1/debug/object/function.o" "../../../../bin.v2/
libs/python/build/gcc-4.0.1/debug/object/inheritance.o" "../../../../
bin.v2/libs/python/build/gcc-4.0.1/debug/object/life_support.o"
"../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/object/
pickle_support.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/
debug/errors.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
module.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
converter/builtin_converters.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/converter/arg_to_python_base.o" "../../../../bin.v2/
libs/python/build/gcc-4.0.1/debug/object/iterator.o" "../../../../
bin.v2/libs/python/build/gcc-4.0.1/debug/object/stl_iterator.o"
"../../../../bin.v2/libs/python/build/gcc-4.0.1/debug/
object_protocol.o" "../../../../bin.v2/libs/python/build/gcc-4.0.1/
debug/object_operators.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/wrapper.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/import.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/exec.o" "../../../../bin.v2/libs/python/build/
gcc-4.0.1/debug/object/function_doc_signature.o" -Wl,-Bstatic -Wl,-
Bdynamic -lpython2.5 -Wl,--end-group -g

...failed gcc.link.dll ../../../../bin.v2/libs/python/build/gcc-4.0.1/
debug/libboost_python-gcc40-d-1_38.dylib...
...skipped <pbin/gcc-4.0.1/debug>extending.so for lack of
<p../../../../bin.v2/libs/python/build/gcc-4.0.1/debug>libboost_python-
gcc40-d-1_38.dylib...
...skipped <pbin/test_ext.test/gcc-4.0.1/debug>test_ext for lack of
<pbin/gcc-4.0.1/debug>extending.so...
common.mkdir bin/test_embed.test
common.mkdir bin/test_embed.test/gcc-4.0.1
common.mkdir bin/test_embed.test/gcc-4.0.1/debug
gcc.compile.c++ bin/gcc-4.0.1/debug/embedding.o
...skipped <pbin/gcc-4.0.1/debug>embedding for lack of <p../../../../
bin.v2/libs/python/build/gcc-4.0.1/debug>libboost_python-gcc40-
d-1_38.dylib...
...skipped <pbin/test_embed.test/gcc-4.0.1/debug>test_embed.run for
lack of <pbin/gcc-4.0.1/debug>embedding...
...failed updating 1 target...
...skipped 6 targets...
...updated 47 targets...

The test does not run automatically but if I try to run it manually I
get:

python test_extending.py Trying: from extending import * Expecting
nothing
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 6, in test_extending Failed example: from
extending import * Exception raised: Traceback (most recent call
last): File "/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib/python2.5/doctest.py", line 1228, in
__run compileflags, 1) in test.globs File "<doctest
test_extending[0]>", line 1, in <module> from extending import *
ImportError: No module named extending Trying: hi =
hello('California') Expecting nothing
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 7, in test_extending Failed example: hi =
hello('California') Exception raised: Traceback (most recent call
last): File "/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib/python2.5/doctest.py", line 1228, in
__run compileflags, 1) in test.globs File "<doctest
test_extending[1]>", line 1, in <module> hi = hello('California')
NameError: name 'hello' is not defined Trying: hi.greet() Expecting:
'Hello from California'
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 8, in test_extending Failed example:
hi.greet() Exception raised: Traceback (most recent call last): File "/
Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/lib/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs File "<doctest test_extending[2]>",
line 1, in <module> hi.greet() NameError: name 'hi' is not defined
Trying: invite(hi) Expecting: 'Hello from California! Please come
soon!'
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 10, in test_extending Failed example:
invite(hi) Exception raised: Traceback (most recent call last): File "/
Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/lib/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs File "<doctest test_extending[3]>",
line 1, in <module> invite(hi) NameError: name 'invite' is not defined
Trying: hi.invite() Expecting: 'Hello from California! Please come
soon!'
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 12, in test_extending Failed example:
hi.invite() Exception raised: Traceback (most recent call last): File
"/Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/lib/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs File "<doctest test_extending[4]>",
line 1, in <module> hi.invite() NameError: name 'hi' is not defined
Trying: class wordy(hello): def greet(self): return hello.greet(self)
+ ', where the weather is fine' Expecting nothing
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 15, in test_extending Failed example: class
wordy(hello): def greet(self): return hello.greet(self) + ', where the
weather is fine' Exception raised: Traceback (most recent call last):
File "/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib/python2.5/doctest.py", line 1228, in
__run compileflags, 1) in test.globs File "<doctest
test_extending[5]>", line 1, in <module> class wordy(hello):
NameError: name 'hello' is not defined Trying: hi2 = wordy('Florida')
Expecting nothing
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 19, in test_extending Failed example: hi2 =
wordy('Florida') Exception raised: Traceback (most recent call last):
File "/Applications/scisoft/i386/Packages/Python-2.5.2/
Python.framework/Versions/2.5/lib/python2.5/doctest.py", line 1228, in
__run compileflags, 1) in test.globs File "<doctest
test_extending[6]>", line 1, in <module> hi2 = wordy('Florida')
NameError: name 'wordy' is not defined Trying: hi2.greet() Expecting:
'Hello from Florida, where the weather is fine'
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 20, in test_extending Failed example:
hi2.greet() Exception raised: Traceback (most recent call last): File
"/Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/lib/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs File "<doctest test_extending[7]>",
line 1, in <module> hi2.greet() NameError: name 'hi2' is not defined
Trying: invite(hi2) Expecting: 'Hello from Florida! Please come soon!'
**********************************************************************
File "/usr/local/boost_1_38_0/libs/python/example/quickstart/
test_extending.py", line 22, in test_extending Failed example:
invite(hi2) Exception raised: Traceback (most recent call last): File
"/Applications/scisoft/i386/Packages/Python-2.5.2/Python.framework/
Versions/2.5/lib/python2.5/doctest.py", line 1228, in __run
compileflags, 1) in test.globs File "<doctest test_extending[8]>",
line 1, in <module> invite(hi2) NameError: name 'invite' is not
defined 1 items had no tests: test_extending.run
**********************************************************************
1 items had failures: 9 of 9 in test_extending 9 tests in 2 items. 0
passed and 9 failed. ***Test Failed*** 9 failures.

Does anyone have any idea what is going wrong?

Kind regards,

Pim Schellart



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net