Boost.NumPy: When I ran make in ./build, there were lots of "undefined reference" errors.

➜ build git:(master) make Scanning dependencies of target boost_numpy [ 7%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/dtype.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/dtype.cpp:9: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ [ 15%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/scalars.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/scalars.cpp:7: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ [ 23%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/ndarray.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/ndarray.cpp:7: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ [ 30%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/matrix.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/matrix.cpp:7: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ [ 38%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/ufunc.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/ufunc.cpp:7: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ [ 46%] Building CXX object libs/numpy/src/CMakeFiles/boost_numpy.dir/numpy.cpp.o In file included from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarraytypes.h:1804:0, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/ndarrayobject.h:17, from /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/arrayobject.h:4, from /home/metadata/work/traffic_object_detection/Boost.NumPy/boost/numpy/internal.hpp:26, from /home/metadata/work/traffic_object_detection/Boost.NumPy/libs/numpy/src/numpy.cpp:7: /home/metadata/.pyenv/versions/anaconda3-2.2.0/lib/python3.4/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " “#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION” [-Wcpp] #warning "Using deprecated NumPy API, disable it by "
^ Linking CXX shared library …/…/…/lib/libboost_numpy.so [ 46%] Built target boost_numpy Scanning dependencies of target dtype

[ 53%] Building CXX object libs/numpy/example/CMakeFiles/dtype.dir/dtype.cpp.o Linking CXX executable …/…/…/bin/dtype CMakeFiles/dtype.dir/dtype.cpp.o: In function main': dtype.cpp:(.text+0x1a): undefined reference toPy_Initialize’ CMakeFiles/dtype.dir/dtype.cpp.o: In function boost::python::converter::arg_to_python<int>::arg_to_python(int const&)': dtype.cpp:(.text._ZN5boost6python9converter13arg_to_pythonIiEC2ERKi[_ZN5boost6python9converter13arg_to_pythonIiEC5ERKi]+0x1c): undefined reference toPyLong_FromLong’ CMakeFiles/dtype.dir/dtype.cpp.o: In function boost::python::api::object::object()': dtype.cpp:(.text._ZN5boost6python3api6objectC2Ev[_ZN5boost6python3api6objectC5Ev]+0xf): undefined reference to_Py_NoneStruct’ CMakeFiles/dtype.dir/dtype.cpp.o: In function boost::python::tuple boost::python::make_tuple<int, int>(int const&, int const&)': dtype.cpp:(.text._ZN5boost6python10make_tupleIiiEENS0_5tupleERKT_RKT0_[_ZN5boost6python10make_tupleIiiEENS0_5tupleERKT_RKT0_]+0x1b): undefined reference to PyTuple_New’ CMakeFiles/dtype.dir/dtype.cpp.o: In functionboost::python::tuple boost::python::make_tuple<char [3], boost::numpy::dtype>(char const (&) [3], boost::numpy::dtype const&)': dtype.cpp:(.text._ZN5boost6python10make_tupleIA3_cNS_5numpy5dtypeEEENS0_5tupleERKT_RKT0_[_ZN5boost6python10make_tupleIA3_cNS_5numpy5dtypeEEENS0_5tupleERKT_RKT0_]+0x1b): undefined reference to PyTuple_New’ CMakeFiles/dtype.dir/dtype.cpp.o: In functionboost::python::converter::extract_pointer<char const*>::extract_pointer(_object_)': dtype.cpp:(.text._ZN5boost6python9converter15extract_pointerIPKcEC2EP7_object[_ZN5boost6python9converter15extract_pointerIPKcEC5EP7_object]+0x1e): undefined reference to _Py_NoneStruct’ CMakeFiles/dtype.dir/dtype.cpp.o: In functionboost::python::converter::extract_pointer<char const_>::operator()() const': dtype.cpp:(.text._ZNK5boost6python9converter15extract_pointerIPKcEclEv[_ZNK5boost6python9converter15extract_pointerIPKcEclEv]+0x23): undefined reference to _Py_NoneStruct’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyList_Insert' ../../../lib/libboost_numpy.so: undefined reference to PyExc_ImportError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyString_InternFromString' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyProperty_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyString_AsString' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyExc_StopIteration’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyUnicodeUCS4_FromEncodedObject' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyImport_Import’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyBool_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyClass_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_InPlaceRshift' ../../../lib/libboost_numpy.so: undefined reference to PyObject_CallMethod’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyIter_Next' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_Remainder’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPy_InitModule4_64' ../../../lib/libboost_numpy.so: undefined reference to PyExc_ValueError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyType_Ready' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to _PyEval_SliceIndex’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyFile_AsFile' ../../../lib/libboost_numpy.so: undefined reference to PyLong_FromUnsignedLong’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyMem_Free' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceXor’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_InPlaceOr' ../../../lib/libboost_numpy.so: undefined reference to PyBool_FromLong’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_Items' ../../../lib/libboost_numpy.so: undefined reference to PyCapsule_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_InPlaceRemainder' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyErr_NoMemory’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyList_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyComplex_ImagAsDouble’ …/…/…/lib/libboost_numpy.so: undefined reference toPyObject_IsTrue' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to _Py_NotImplementedStruct’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyExc_TypeError' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyDict_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Lshift' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceMultiply’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to_PyObject_New' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyInt_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyComplex_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyExc_ReferenceError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyObject_GetItem' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyString_FromStringAndSize’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyModule_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceLshift’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyString_Size' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyDict_Update’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyComplex_RealAsDouble' ../../../lib/libboost_numpy.so: undefined reference to PyErr_Format’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyBaseObject_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_And’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyUnicodeUCS4_AsWideChar' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceAdd’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyObject_GetAttr' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyErr_ExceptionMatches’ …/…/…/lib/libboost_numpy.so: undefined reference toPyErr_Occurred' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyDict_Copy’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyArg_ParseTupleAndKeywords' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_Divide’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyEval_GetGlobals' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyFloat_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_Keys' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyExc_IndexError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyErr_SetObject' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_Multiply’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyRun_FileExFlags' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyUnicode_Type’ …/…/…/lib/libboost_numpy.so: undefined reference toPyObject_Size' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyString_FromString’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyString_FromFormat' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceAnd’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyInt_FromLong' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyTuple_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_Size' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyDict_GetItem’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyObject_SetItem' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyInt_AsLong’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyObject_RichCompare' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyCFunction_NewEx’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_Values' ../../../lib/libboost_numpy.so: undefined reference to PyExc_RuntimeError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Rshift' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyStaticMethod_New’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyType_IsSubtype' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyType_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Add' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyList_Sort’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPySequence_DelSlice' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyErr_WarnEx’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyMethod_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyStaticMethod_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Xor' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyObject_ClearWeakRefs’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Subtract' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PySlice_New’ …/…/…/lib/libboost_numpy.so: undefined reference toPyObject_GetAttrString' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyObject_IsInstance’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyLong_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyRun_StringFlags’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyObject_SetAttrString' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyExc_OverflowError’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyWeakref_NewRef' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyErr_NewException’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyList_Append' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyObject_SetAttr’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_GetItemString' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyNumber_InPlaceDivide’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyLong_AsLongLong' ../../../lib/libboost_numpy.so: undefined reference to PyErr_Print’ …/…/…/lib/libboost_numpy.so: undefined reference toPyExc_AttributeError' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyLong_AsUnsignedLongLong’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_Or' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyObject_DelItem’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyNumber_InPlaceSubtract' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyMethod_New’ …/…/…/lib/libboost_numpy.so: undefined reference toPyEval_CallFunction' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PySequence_GetSlice’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyTuple_Size' ../../../lib/libboost_numpy.so: undefined reference to PyImport_ImportModule’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyErr_Clear' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyCFunction_Type’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyTuple_GetItem' ../../../lib/libboost_numpy.so: undefined reference to PyErr_SetString’ …/…/…/lib/libboost_numpy.so: undefined reference toPyObject_CallFunction' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyList_Reverse’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyString_Type' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyFile_FromString’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to_PyType_Lookup' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyList_New’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyType_GenericAlloc' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyMem_Malloc’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyCallable_Check' ../../../lib/libboost_numpy.so: undefined reference to PyCapsule_GetPointer’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyDict_Clear' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PySequence_SetSlice’ /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference toPyLong_AsUnsignedLong' /home/metadata/work/traffic_object_detection/boost_1_58_0/stage/lib/libboost_python3.so: undefined reference to PyDict_New’ collect2: error: ld returned 1 exit status make[2]: *** [bin/dtype] Error 1 make[1]: *** [libs/numpy/example/CMakeFiles/dtype.dir/all] Error 2 make: *** [all] Error 2

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Same command fixed for typos:

cmake -v -DPYTHON_LIBRARY='/home/guillaume/anaconda/envs/python3/lib/libpython3.4m.so' \
   -DPYTHON_EXECUTABLE='/home/guillaume/anaconda/envs/python3/bin/python' \
   -DBoost_INCLUDE_DIR='/home/guillaume/anaconda/envs/python3/include' \
   -D Boost_NO_BOOST_CMAKE=ON ..

Hi,

I see the same issue with a comparable set-up.

Here is my cmake command:

cmake -v -DPYTHON_LIBRARIES='/home/guillaume/anaconda/envs/python3/lib/libpython3.4m.so' -D Boost_NO_BOOST_CMAKE=ON -DPYTHON_EXECUTABLE='/home/guillaume/anaconda/envs/python3/bin/python' -DBoost_INCLUDE_DIR='/home/guillaume/anaconda/envs/python3/include' ..

Here is the output:

-- Found PythonInterp: /home/guillaume/anaconda/envs/python3/bin/python (found suitable version "3.4.3", minimum required is "3") 
-- Found PythonInterp: /home/guillaume/anaconda/envs/python3/bin/python (found version "3.4.3") 
-- Using Python3
-- Boost version: 1.58.0
-- Found the following Boost libraries:
--   python3
-- Boost Paths:
-- Include  : /home/guillaume/anaconda/envs/python3/include
-- Libraries: /home/guillaume/anaconda/envs/python3/lib/libboost_python3.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/guillaume/usr/src/Boost.NumPy/build

Here is the error returned by make:

[ 46%] Built target boost_numpy
Linking CXX executable ../../../bin/dtype
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_InternFromString »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_FromFormat »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_FromString »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyBytes_Size »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_AsUTF8 »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_FromEncodedObject »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyBytes_AsString »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « _Py_fopen »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyModule_Create2 »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_AsWideChar »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_AsUTF8String »
/home/guillaume/anaconda/envs/python3/lib/libboost_python3.so: référence indéfinie vers « PyUnicode_FromStringAndSize »
collect2: error: ld returned 1 exit status

And here is what’s defined in /home/guillaume/anaconda/envs/python3/lib/libpython3.4m.so:

nm /home/guillaume/anaconda/envs/python3/lib/libpython3.4m.so | grep "PyUnicode_"
00000000000dc700 T PyUnicode_Append
00000000000dcb00 T PyUnicode_AppendAndDel
00000000000e4a60 T _PyUnicode_AsASCIIString
00000000000e4ae0 T PyUnicode_AsASCIIString
00000000000e5b50 T PyUnicode_AsCharmapString
00000000000fb0c0 T PyUnicode_AsDecodedObject
00000000000f8b30 T PyUnicode_AsDecodedUnicode
00000000000deb40 T PyUnicode_AsEncodedObject
00000000000e4bb0 T PyUnicode_AsEncodedString
00000000000dea70 T PyUnicode_AsEncodedUnicode
00000000000d7870 T _PyUnicode_AsKind
00000000000e4af0 T _PyUnicode_AsLatin1String
00000000000e4ba0 T PyUnicode_AsLatin1String
00000000000dd810 T PyUnicode_AsRawUnicodeEscapeString
00000000000da330 T PyUnicode_AsUCS4
00000000000d7860 T PyUnicode_AsUCS4Copy
00000000000db5f0 T PyUnicode_AsUnicode
00000000000db1f0 T PyUnicode_AsUnicodeAndSize
00000000000db550 T PyUnicode_AsUnicodeCopy
00000000000ddab0 T PyUnicode_AsUnicodeEscapeString
00000000000f1c30 T PyUnicode_AsUTF16String
00000000000e2d70 T PyUnicode_AsUTF32String
00000000000e3d60 T PyUnicode_AsUTF8
00000000000e3bf0 T PyUnicode_AsUTF8AndSize
00000000000e3ab0 T _PyUnicode_AsUTF8String
00000000000e3be0 T PyUnicode_AsUTF8String
00000000000e0b40 T PyUnicode_AsWideChar
00000000000e0be0 T PyUnicode_AsWideCharString
00000000000de2d0 T PyUnicode_BuildEncodingMap
00000000000d0e10 T PyUnicode_ClearFreeList
00000000000d0d70 T _PyUnicode_ClearStaticStrings
00000000000dd240 T PyUnicode_Compare
00000000000d6f90 T PyUnicode_CompareWithASCIIString
00000000000f5ec0 T _PyUnicode_CompareWithId
00000000000da6b0 T PyUnicode_Concat
00000000000da920 T PyUnicode_Contains
00000000000da370 T _PyUnicode_Copy
00000000000daf00 T PyUnicode_CopyCharacters
00000000000ff970 T PyUnicode_Count
00000000000f6930 T PyUnicode_Decode

...

So the definitions seem to be there. How can I check if the correct library is linked?

Best,

Guillaume

A follow up: I managed to have a successful compile with the following cmake command:

cmake -v -DPYTHON_LIBRARY='/home/guillaume/anaconda/envs/python3/lib/libpython3.4m.so'\
   -DPYTHON_EXECUTABLE='/home/guillaume/anaconda/envs/python3/bin/python'\ 
   -DBoost_INCLUDE_DIR='/home/guillaume/anaconda/envs/python3/include'\
   -D Boost_NO_BOOST_CMAKE=ON ..

It doesn’t work with python3.so and it’s -DPYTHON_LIBRARY not -DPYTHON_LIBRARIES

Guillaume