[C++-sig] Undefined symbols for architecture x86_64 - Building boost 1.52 with Python 3.3 on MacOSX

Simon W simwarg at gmail.com
Fri May 24 21:19:48 CEST 2013


Hello,

I need som help.

I'm building boost on my Mac OSX 10.8 using the bjam build system.

I have installed Python 3.3 seperatly aas it doesn't ship with the Mac. So
I have my project-config.jam file like:

# Boost.Build Configuration
# Automatically generated by bootstrap.sh

import option ;
import feature ;

if ! darwin in [ feature.values <toolset> ]
{
    using darwin ;
}

project : default-build <toolset>darwin ;

# Python configuration
using python : 3.3 : /Library/Frameworks/Python.framework/Versions/3.3
: /Library/Frameworks/Python.framework/Versions/3.3/Headers
: /Library/Frameworks/Python.framework/Versions/3.3/lib ;


libraries =  --with-python ;


option.set prefix : /usr/local ;
option.set exec-prefix : /usr/local ;
option.set libdir : /usr/local/lib ;
option.set includedir : /usr/local/include ;

# Stop on first error
option.set keep-going : false ;

I'm not used to Mac but I think it compiles but during linking I get the
following error:
Undefined symbols for architecture x86_64:
  "_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
  "_PyInt_FromLong", referenced from:
      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::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, 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>(_object*, 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
  "_PyString_FromStringAndSize", referenced from:
      boost::python::numeric::(anonymous namespace)::load(bool)in numeric.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

What is wrong?

Thanks,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20130524/1f1def8b/attachment.html>


More information about the Cplusplus-sig mailing list