Link error in "make pycaffe" referenced from Boost

371 views
Skip to first unread message

Kevin Wood

unread,
Jul 8, 2015, 7:29:09 PM7/8/15
to caffe...@googlegroups.com
I'm trying to build Caffe for use with Python on OSX 10.10 and Anaconda with Python 3.4. I've made it pretty far, but when I "make pycaffe" I get the following unresolved symbols:

Kevins-MacBook-Pro:caffe kevin$ make pycaffe

CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp

Undefined symbols for architecture x86_64:

  "_PyUnicode_FromStringAndSize", referenced from:

      boost::python::objects::caller_py_function_impl<boost::python::detail::caller<boost::python::objects::iterator_range<boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*> >::next, boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, boost::mpl::vector2<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, boost::python::objects::iterator_range<boost::python::return_value_policy<boost::python::return_by_value, boost::python::default_call_policies>, std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*> >&> > >::operator()(_object*, _object*) in _caffe-525e79.o

      boost::python::detail::no_proxy_helper<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, boost::python::detail::final_vector_derived_policies<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, false>, boost::python::detail::container_element<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, unsigned long, boost::python::detail::final_vector_derived_policies<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >, false> >, unsigned long>::base_get_item_(boost::python::back_reference<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&> const&, _object*) in _caffe-525e79.o

  "boost::python::detail::init_module(PyModuleDef&, void (*)())", referenced from:

      _PyInit__caffe in _caffe-525e79.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make: *** [python/caffe/_caffe.so] Error 1


I'm new to Python, but I still thought that _PyUnicode_FromStringAndSize is part of Python itself. Is there a library I'm missing somehow? Anyone happen to have an idea for this one? Many thanks!

Peerajak Witoonchart

unread,
Aug 26, 2015, 4:56:32 AM8/26/15
to Caffe Users
I got some PyUnivode_<something else> error too. What I did was I revert back to python 2.7 Ubuntu version, and re-install boost all over again. Then it works.

เมื่อ วันพฤหัสบดีที่ 9 กรกฎาคม ค.ศ. 2015 6 นาฬิกา 29 นาที 09 วินาที UTC+7, Kevin Wood เขียนว่า:
Reply all
Reply to author
Forward
0 new messages