boost.python quick start hanging on Mac OS X 10.5
Hi, I have downloaded boost_1_49_0 to my Mac with OS X 10.5.8. I then ran: In the home folder I have: using python : 3.1 : /Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 ; In user-config.jam. I then ran the following: *** *** Start Screen dump 1 *** $ ./bjam --with-python --user-config=user-config.jam Building the Boost C++ Libraries. Component configuration: - chrono : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - math : not building - mpi : not building - program_options : not building - python : building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...patience... ...patience... ...found 1599 targets... ...updating 2 targets... darwin.link.dll bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib Undefined symbols: "_PyFile_AsFile", referenced from: boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o "_PyString_FromFormat", referenced from: boost::python::converter::rvalue_from_python_stage2(_object*, boost::python::converter::rvalue_from_python_stage1_data&, boost::python::converter::registration const&)in from_python.o boost::python::converter::(anonymous namespace)::throw_no_lvalue_from_python(_object*, boost::python::converter::registration const&, char const*) in from_python.o boost::python::converter::(anonymous namespace)::lvalue_result_from_python(_object*, boost::python::converter::registration const&, char const*) in from_python.o boost::python::converter::registration::to_python(void const volatile*) constin registry.o _enum_repr in enum.o _enum_repr in enum.o "_PyClass_Type", referenced from: _PyClass_Type$non_lazy_ptr in function.o "_PyNumber_Divide", referenced from: boost::python::api::operator/(boost::python::api::object const&, boost::python::api::object const&)in object_operators.o "_PyString_FromStringAndSize", referenced from: boost::python::numeric::(anonymous namespace)::load(bool) in numeric.o boost::python::detail::str_base::str_base(char const*, char const*)in str.o boost::python::detail::str_base::str_base(char const*, char const*)in str.o boost::python::detail::str_base::str_base(char const*, unsigned long)in str.o boost::python::detail::str_base::str_base(char const*, unsigned long)in str.o boost::python::converter::do_return_to_python(char)in builtin_converters.o boost::python::tuple boost::python::make_tuple<boost::python::str, boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::str>(boost::python::str const&, boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::python::str const&)in function_doc_signature.o boost::python::tuple boost::python::make_tuple<boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::str>(boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::python::str const&)in function_doc_signature.o boost::python::tuple boost::python::make_tuple<boost::python::str, boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(boost::python::str const&, boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in function_doc_signature.o "_PyInt_Type", referenced from: _PyInt_Type$non_lazy_ptr in enum.o "_PyString_FromString", referenced from: boost::python::detail::str_base::str_base()in str.o boost::python::detail::str_base::str_base()in str.o boost::python::detail::str_base::str_base(char const*)in str.o boost::python::detail::str_base::str_base(char const*)in str.o boost::python::converter::do_return_to_python(char const*)in builtin_converters.o "_PyInt_AsLong", referenced from: boost::python::detail::list_base::count(boost::python::api::object const&) constin list.o boost::python::detail::list_base::index(boost::python::api::object const&) constin list.o boost::python::detail::list_base::insert(boost::python::api::object const&, boost::python::api::object const&)in list.o boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::isupper() constin str.o boost::python::detail::str_base::istitle() constin str.o boost::python::detail::str_base::isspace() constin str.o boost::python::detail::str_base::islower() constin str.o boost::python::detail::str_base::isdigit() constin str.o boost::python::detail::str_base::isalpha() constin str.o boost::python::detail::str_base::isalnum() constin str.o boost::python::detail::str_base::startswith(boost::python::api::object const&) constin str.o boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::endswith(boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&) constin str.o _instance_new in class.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<int, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<int> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<long, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<long> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<signed char, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<signed char> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<short, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<short> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o "_PyNumber_InPlaceDivide", referenced from: boost::python::api::operator/=(boost::python::api::object&, boost::python::api::object const&)in object_operators.o "_PyString_InternFromString", referenced from: _function_get_name in function.o "_PyString_Size", referenced from: boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::converter::(anonymous namespace)::string_rvalue_from_python>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o "_PyFile_FromString", referenced from: boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o "_PyString_Type", referenced from: _PyString_Type$non_lazy_ptr in str.o "_PyInt_FromLong", referenced from: boost::python::numeric::aux::array_base::argmin(long)in numeric.o boost::python::numeric::aux::array_base::argmax(long)in numeric.o boost::python::numeric::aux::array_base::argsort(long)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long>(_object*, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long>(_object*, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, boost::python::api::object, long>(_object*, boost::python::api::object const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::list_base::pop(long)in list.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, boost::python::api::object>(_object*, long const&, boost::python::api::object const&, boost::type<boost::python::api::object>*)in list.o boost::python::objects::enum_base::to_python(_typeobject*, long)in enum.o boost::python::objects::enum_base::to_python(_typeobject*, long)in enum.o boost::python::objects::enum_base::add_value(char const*, long)in enum.o boost::python::objects::enum_base::add_value(char const*, long)in enum.o boost::python::objects::enum_base::export_values() in enum.o boost::python::objects::enum_base::export_values() in enum.o _object* boost::python::api::object_base_initializer<unsigned int>(unsigned int const&)in enum.o _object* boost::python::api::object_base_initializer<unsigned long>(unsigned long const&)in class.o boost::python::objects::function_doc_signature_generator::parameter_string(boost::python::objects::py_function const&, unsigned long, boost::python::api::object, bool)in function_doc_signature.o boost::python::objects::function_doc_signature_generator::pretty_signature(boost::python::objects::function const*, unsigned long, bool)in function_doc_signature.o boost::python::api::object::object<int>(int const&)in function_doc_signature.o boost::python::api::proxy<boost::python::api::slice_policies> boost::python::api::object_operators<boost::python::api::object>::slice<int, boost::python::api::slice_nil>(int const&, boost::python::api::slice_nil const&)in function_doc_signature.o "_Py_InitModule4", referenced from: boost::python::detail::init_module(char const*, void (*)())in module.o "_PyString_AsString", referenced from: _enum_repr in enum.o _enum_repr in enum.o _enum_repr in enum.o boost::python::converter::(anonymous namespace)::convert_to_cstring(_object*) in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::converter::(anonymous namespace)::string_rvalue_from_python>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o ld: symbol(s) not found collect2: ld returned 1 exit status "g++" -dynamiclib -Wl,-single_module -install_name "libboost_python3.dylib" -L"/Library/Frameworks/Python.framework/Versions/3.1/lib" -L"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/config" -o "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/numeric.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/list.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/long.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/dict.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/tuple.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/str.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/slice.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/from_python.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/registry.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/type_id.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/enum.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/class.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/function.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/inheritance.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/life_support.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/pickle_support.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/errors.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/module.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/builtin_converters.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/arg_to_python_base.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/iterator.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/stl_iterator.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object_protocol.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object_operators.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/wrapper.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/import.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/exec.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/function_doc_signature.o" -lpython3.1 -headerpad_max_install_names -Wl,-dead_strip -no_dead_strip_inits_and_terms ...failed darwin.link.dll bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib... ...skipped <pstage/lib>libboost_python3.dylib for lack of <pbin.v2/libs/python/build/darwin-4.0.1/release/threading-multi>libboost_python3.dylib... ...failed updating 1 target... ...skipped 1 target... *** *** End Screen dump 1 *** So I changed to 2.7 in the user config file and got: *** *** Start Screen dump 2 *** ./bjam --with-python --user-config=user-config.jam Building the Boost C++ Libraries. Component configuration: - chrono : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - math : not building - mpi : not building - program_options : not building - python : building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...patience... ...patience... ...found 1597 targets... The Boost C++ Libraries were successfully built! The following directory should be added to compiler include paths: /Users/me/Desktop/boost_1_49_0 The following directory should be added to linker library paths: /Users/me/Desktop/boost_1_49_0/stage/lib *** *** End Screen dump 2 *** So that seemed to work. I then entered: *** *** Start Screen dump 3 *** $cd libs/python/example/quickstart/ $../../../../bjam toolset=darwin --verbose-test test ...patience... ...patience... ...found 1680 targets... ...updating 17 targets... common.mkdir bin common.mkdir bin/test_embed.test common.mkdir bin/test_embed.test/darwin-4.0.1 common.mkdir bin/test_embed.test/darwin-4.0.1/debug common.mkdir bin/darwin-4.0.1 common.mkdir bin/darwin-4.0.1/debug darwin.compile.c++ bin/darwin-4.0.1/debug/embedding.o darwin.link bin/darwin-4.0.1/debug/embedding testing.capture-output bin/test_embed.test/darwin-4.0.1/debug/test_embed.run ====== BEGIN OUTPUT ====== registering extension module embedded_hello... defining Python class derived from Base... testing derived class from C++... success! running file script.py... Hello World ! success! intentionally causing a python exception... Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'unknown' is not defined No errors detected. EXIT STATUS: 0 ====== END OUTPUT ====== **passed** bin/test_embed.test/darwin-4.0.1/debug/test_embed.test common.mkdir bin/test_ext.test common.mkdir bin/test_ext.test/darwin-4.0.1 common.mkdir bin/test_ext.test/darwin-4.0.1/debug darwin.compile.c++ bin/darwin-4.0.1/debug/extending.o darwin.link.dll bin/darwin-4.0.1/debug/extending.so *** *** End Screen dump 3 *** It hangs on the last line so I have to cancel it. I then ran: *** *** Start Screen dump 4 *** $ python2.7 test_extending.py Trying: from extending import * Expecting nothing ********************************************************************** File "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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. *** *** End Screen dump 4 *** If I enter bin/darwin-4.0.1/debug, I get this for ls -al: mes-computer-444:debug me$ ls -al total 2688 drwxr-xr-x 6 me me 204 Mar 9 11:36 . drwxr-xr-x 3 me me 102 Mar 9 11:36 .. -rwxr-xr-x 1 barrygriffin me 164080 Mar 9 11:36 embedding -rw-r--r-- 1 me me 472992 Mar 9 11:36 embedding.o -rw-r--r-- 1 me me 530060 Mar 9 11:36 extending.o -rwxr-xr-x 1 me me 199076 Mar 9 11:36 extending.so Why am I hanging? I'd like to get python3 to work with boost but maybe its best to fix the hanging problem first. Thanks, Barry Hi, I have downloaded boost_1_49_0 to my Mac with OS X 10.5.8. I then ran: In the home folder I have: using python : 3.1 : /Library/Frameworks/Python.framework/Versions/3.1/bin/python3.1 ; In user-config.jam. I then ran the following: *** *** Start Screen dump 1 *** $ ./bjam --with-python --user-config=user-config.jam Building the Boost C++ Libraries. Component configuration: - chrono : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - math : not building - mpi : not building - program_options : not building - python : building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...patience... ...patience... ...found 1599 targets... ...updating 2 targets... darwin.link.dll bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib Undefined symbols: "_PyFile_AsFile", referenced from: boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o "_PyString_FromFormat", referenced from: boost::python::converter::rvalue_from_python_stage2(_object*, boost::python::converter::rvalue_from_python_stage1_data&, boost::python::converter::registration const&)in from_python.o boost::python::converter::(anonymous namespace)::throw_no_lvalue_from_python(_object*, boost::python::converter::registration const&, char const*) in from_python.o boost::python::converter::(anonymous namespace)::lvalue_result_from_python(_object*, boost::python::converter::registration const&, char const*) in from_python.o boost::python::converter::registration::to_python(void const volatile*) constin registry.o _enum_repr in enum.o _enum_repr in enum.o "_PyClass_Type", referenced from: _PyClass_Type$non_lazy_ptr in function.o "_PyNumber_Divide", referenced from: boost::python::api::operator/(boost::python::api::object const&, boost::python::api::object const&)in object_operators.o "_PyString_FromStringAndSize", referenced from: boost::python::numeric::(anonymous namespace)::load(bool) in numeric.o boost::python::detail::str_base::str_base(char const*, char const*)in str.o boost::python::detail::str_base::str_base(char const*, char const*)in str.o boost::python::detail::str_base::str_base(char const*, unsigned long)in str.o boost::python::detail::str_base::str_base(char const*, unsigned long)in str.o boost::python::converter::do_return_to_python(char)in builtin_converters.o boost::python::tuple boost::python::make_tuple<boost::python::str, boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::str>(boost::python::str const&, boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::python::str const&)in function_doc_signature.o boost::python::tuple boost::python::make_tuple<boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::str>(boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, boost::python::str const&)in function_doc_signature.o boost::python::tuple boost::python::make_tuple<boost::python::str, boost::python::api::object, boost::python::str, boost::python::str, boost::python::str, std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(boost::python::str const&, boost::python::api::object const&, boost::python::str const&, boost::python::str const&, boost::python::str const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)in function_doc_signature.o "_PyInt_Type", referenced from: _PyInt_Type$non_lazy_ptr in enum.o "_PyString_FromString", referenced from: boost::python::detail::str_base::str_base()in str.o boost::python::detail::str_base::str_base()in str.o boost::python::detail::str_base::str_base(char const*)in str.o boost::python::detail::str_base::str_base(char const*)in str.o boost::python::converter::do_return_to_python(char const*)in builtin_converters.o "_PyInt_AsLong", referenced from: boost::python::detail::list_base::count(boost::python::api::object const&) constin list.o boost::python::detail::list_base::index(boost::python::api::object const&) constin list.o boost::python::detail::list_base::insert(boost::python::api::object const&, boost::python::api::object const&)in list.o boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::isupper() constin str.o boost::python::detail::str_base::istitle() constin str.o boost::python::detail::str_base::isspace() constin str.o boost::python::detail::str_base::islower() constin str.o boost::python::detail::str_base::isdigit() constin str.o boost::python::detail::str_base::isalpha() constin str.o boost::python::detail::str_base::isalnum() constin str.o boost::python::detail::str_base::startswith(boost::python::api::object const&) constin str.o boost::python::detail::str_base::startswith(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&, boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&, boost::python::api::object const&) constin str.o boost::python::detail::str_base::endswith(boost::python::api::object const&) constin str.o boost::python::detail::str_base::find(boost::python::api::object const&) constin str.o boost::python::detail::str_base::index(boost::python::api::object const&) constin str.o boost::python::detail::str_base::rfind(boost::python::api::object const&) constin str.o boost::python::detail::str_base::rindex(boost::python::api::object const&) constin str.o _instance_new in class.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<int, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<int> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<long, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<long> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<signed char, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<signed char> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<short, boost::python::converter::(anonymous namespace)::signed_int_rvalue_from_python<short> >::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o "_PyNumber_InPlaceDivide", referenced from: boost::python::api::operator/=(boost::python::api::object&, boost::python::api::object const&)in object_operators.o "_PyString_InternFromString", referenced from: _function_get_name in function.o "_PyString_Size", referenced from: boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::converter::(anonymous namespace)::string_rvalue_from_python>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o "_PyFile_FromString", referenced from: boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o boost::python::exec_file(boost::python::str, boost::python::api::object, boost::python::api::object)in exec.o "_PyString_Type", referenced from: _PyString_Type$non_lazy_ptr in str.o "_PyInt_FromLong", referenced from: boost::python::numeric::aux::array_base::argmin(long)in numeric.o boost::python::numeric::aux::array_base::argmax(long)in numeric.o boost::python::numeric::aux::array_base::argsort(long)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long, long>(_object*, long const&, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long>(_object*, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, long>(_object*, long const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, boost::python::api::object, long>(_object*, boost::python::api::object const&, long const&, boost::type<boost::python::api::object>*)in numeric.o boost::python::detail::list_base::pop(long)in list.o boost::python::detail::returnable<boost::python::api::object>::type boost::python::call<boost::python::api::object, long, boost::python::api::object>(_object*, long const&, boost::python::api::object const&, boost::type<boost::python::api::object>*)in list.o boost::python::objects::enum_base::to_python(_typeobject*, long)in enum.o boost::python::objects::enum_base::to_python(_typeobject*, long)in enum.o boost::python::objects::enum_base::add_value(char const*, long)in enum.o boost::python::objects::enum_base::add_value(char const*, long)in enum.o boost::python::objects::enum_base::export_values() in enum.o boost::python::objects::enum_base::export_values() in enum.o _object* boost::python::api::object_base_initializer<unsigned int>(unsigned int const&)in enum.o _object* boost::python::api::object_base_initializer<unsigned long>(unsigned long const&)in class.o boost::python::objects::function_doc_signature_generator::parameter_string(boost::python::objects::py_function const&, unsigned long, boost::python::api::object, bool)in function_doc_signature.o boost::python::objects::function_doc_signature_generator::pretty_signature(boost::python::objects::function const*, unsigned long, bool)in function_doc_signature.o boost::python::api::object::object<int>(int const&)in function_doc_signature.o boost::python::api::proxy<boost::python::api::slice_policies> boost::python::api::object_operators<boost::python::api::object>::slice<int, boost::python::api::slice_nil>(int const&, boost::python::api::slice_nil const&)in function_doc_signature.o "_Py_InitModule4", referenced from: boost::python::detail::init_module(char const*, void (*)())in module.o "_PyString_AsString", referenced from: _enum_repr in enum.o _enum_repr in enum.o _enum_repr in enum.o boost::python::converter::(anonymous namespace)::convert_to_cstring(_object*) in builtin_converters.o boost::python::converter::(anonymous namespace)::slot_rvalue_from_python<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::python::converter::(anonymous namespace)::string_rvalue_from_python>::construct(_object*, boost::python::converter::rvalue_from_python_stage1_data*)in builtin_converters.o ld: symbol(s) not found collect2: ld returned 1 exit status "g++" -dynamiclib -Wl,-single_module -install_name "libboost_python3.dylib" -L"/Library/Frameworks/Python.framework/Versions/3.1/lib" -L"/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/config" -o "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/numeric.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/list.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/long.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/dict.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/tuple.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/str.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/slice.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/from_python.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/registry.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/type_id.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/enum.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/class.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/function.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/inheritance.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/life_support.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/pickle_support.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/errors.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/module.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/builtin_converters.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/converter/arg_to_python_base.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/iterator.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/stl_iterator.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object_protocol.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object_operators.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/wrapper.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/import.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/exec.o" "bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/object/function_doc_signature.o" -lpython3.1 -headerpad_max_install_names -Wl,-dead_strip -no_dead_strip_inits_and_terms ...failed darwin.link.dll bin.v2/libs/python/build/darwin-4.0.1/release/threading-multi/libboost_python3.dylib... ...skipped <pstage/lib>libboost_python3.dylib for lack of <pbin.v2/libs/python/build/darwin-4.0.1/release/threading-multi>libboost_python3.dylib... ...failed updating 1 target... ...skipped 1 target... *** *** End Screen dump 1 *** So I changed to 2.7 in the user config file and got: *** *** Start Screen dump 2 *** ./bjam --with-python --user-config=user-config.jam Building the Boost C++ Libraries. Component configuration: - chrono : not building - date_time : not building - exception : not building - filesystem : not building - graph : not building - graph_parallel : not building - iostreams : not building - locale : not building - math : not building - mpi : not building - program_options : not building - python : building - random : not building - regex : not building - serialization : not building - signals : not building - system : not building - test : not building - thread : not building - timer : not building - wave : not building ...patience... ...patience... ...found 1597 targets... The Boost C++ Libraries were successfully built! The following directory should be added to compiler include paths: /Users/me/Desktop/boost_1_49_0 The following directory should be added to linker library paths: /Users/me/Desktop/boost_1_49_0/stage/lib *** *** End Screen dump 2 *** So that seemed to work. I then entered: *** *** Start Screen dump 3 *** $cd libs/python/example/quickstart/ $../../../../bjam toolset=darwin --verbose-test test ...patience... ...patience... ...found 1680 targets... ...updating 17 targets... common.mkdir bin common.mkdir bin/test_embed.test common.mkdir bin/test_embed.test/darwin-4.0.1 common.mkdir bin/test_embed.test/darwin-4.0.1/debug common.mkdir bin/darwin-4.0.1 common.mkdir bin/darwin-4.0.1/debug darwin.compile.c++ bin/darwin-4.0.1/debug/embedding.o darwin.link bin/darwin-4.0.1/debug/embedding testing.capture-output bin/test_embed.test/darwin-4.0.1/debug/test_embed.run ====== BEGIN OUTPUT ====== registering extension module embedded_hello... defining Python class derived from Base... testing derived class from C++... success! running file script.py... Hello World ! success! intentionally causing a python exception... Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'unknown' is not defined No errors detected. EXIT STATUS: 0 ====== END OUTPUT ====== **passed** bin/test_embed.test/darwin-4.0.1/debug/test_embed.test common.mkdir bin/test_ext.test common.mkdir bin/test_ext.test/darwin-4.0.1 common.mkdir bin/test_ext.test/darwin-4.0.1/debug darwin.compile.c++ bin/darwin-4.0.1/debug/extending.o darwin.link.dll bin/darwin-4.0.1/debug/extending.so *** *** End Screen dump 3 *** It hangs on the last line so I have to cancel it. I then ran: *** *** Start Screen dump 4 *** $ python2.7 test_extending.py Trying: from extending import * Expecting nothing ********************************************************************** File "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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 "/Users/me/Desktop/boost_1_49_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 "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/doctest.py", line 1248, 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. *** *** End Screen dump 4 *** If I enter bin/darwin-4.0.1/debug, I get this for ls -al: mes-computer-444:debug me$ ls -al total 2688 drwxr-xr-x 6 me me 204 Mar 9 11:36 . drwxr-xr-x 3 me me 102 Mar 9 11:36 .. -rwxr-xr-x 1 barrygriffin me 164080 Mar 9 11:36 embedding -rw-r--r-- 1 me me 472992 Mar 9 11:36 embedding.o -rw-r--r-- 1 me me 530060 Mar 9 11:36 extending.o -rwxr-xr-x 1 me me 199076 Mar 9 11:36 extending.so Why am I hanging? I'd like to get python3 to work with boost but maybe its best to fix the hanging problem first. Thanks, Barry
participants (1)
-
Harry Griff