树莓派respberry中cmake编译链接python2.7库不成功,求教

发布于 2022-09-12 13:13:05 字数 26086 浏览 19 评论 0

本人在树莓派pi3平台上,下载respberry 5.4 lite 编译一个github上的项目,该项目用cmake管理,目前看到 链接库阶段不成功。

请教如何调整cmake的链接库目录,或是怎样直接调整生成的makefile,用于连编

项目地址
https://github.com/psykulsk/RpiANC

是一个主动降噪的项目,源码用到了python2.7,matlab的一些库。
按原项目文档编译说明要求执行不成功

Build and run commands

Example:

   mkdir build && cd build
   cmake ../ && make all 

Main binary that does feedforward active noise control:

./ffANC 

Simple tests that show how LMS and FxLMS attenuate simulated noise on matplotlib plots:

./lmstest
./fxlmstest 

编译报错代码如下

build  CMakeCache.txt  CMakeFiles  cmake_install.cmake  CMakeLists.txt  docs  Headers  LICENSE  Mains  Makefile  MakefileBack  matplotlibcpp-license.txt  README.md  Scripts  Sources
pi@raspberrypi:~/RpiANC $ make
[  1%] Linking CXX executable fxlmstest
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::detail::_interpreter::_interpreter()':
fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2c): undefined reference to `Py_SetProgramName'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x30): undefined reference to `Py_Initialize'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x38): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x48): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x58): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xbc): undefined reference to `PyImport_Import'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x178): undefined reference to `PyObject_CallMethod'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x184): undefined reference to `PyImport_Import'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x214): undefined reference to `PyImport_Import'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2a4): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2bc): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2d4): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x2ec): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x304): undefined reference to `PyObject_GetAttrString'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o:fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x31c): more undefined references to `PyObject_GetAttrString' follow
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::detail::_interpreter::_interpreter()':
fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0x9e0): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterC2Ev[_ZN13matplotlibcpp6detail12_interpreterC5Ev]+0xaf4): undefined reference to `PyFunction_Type'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::detail::_interpreter::~_interpreter()':
fxlmstest.cpp:(.text._ZN13matplotlibcpp6detail12_interpreterD2Ev[_ZN13matplotlibcpp6detail12_interpreterD5Ev]+0x10): undefined reference to `Py_Finalize'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::subplot(long, long, long)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x1c): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x3c): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x50): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x68): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x7c): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0x94): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0xa8): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp7subplotElll[_ZN13matplotlibcpp7subplotElll]+0xc4): undefined reference to `PyObject_CallObject'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::title(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x20): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x30): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x4c): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp5titleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x68): undefined reference to `PyObject_CallObject'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `matplotlibcpp::show(bool)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp4showEb[_ZN13matplotlibcpp4showEb]+0x40): undefined reference to `PyObject_CallObject'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4showEb[_ZN13matplotlibcpp4showEb]+0x50): undefined reference to `PyDict_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4showEb[_ZN13matplotlibcpp4showEb]+0x6c): undefined reference to `PyDict_SetItemString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4showEb[_ZN13matplotlibcpp4showEb]+0x94): undefined reference to `PyObject_Call'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4showEb[_ZN13matplotlibcpp4showEb]+0x17c): undefined reference to `_Py_ZeroStruct'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `bool matplotlibcpp::semilogy<float, float>(std::vector<float, std::allocator<float> > const&, std::vector<float, std::allocator<float> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x7c): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x8c): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xa8): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xbc): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xd0): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp8semilogyIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xec): undefined reference to `PyObject_CallObject'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `bool matplotlibcpp::plot<float, float>(std::vector<float, std::allocator<float> > const&, std::vector<float, std::allocator<float> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x7c): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x8c): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xa8): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xbc): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xd0): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIffEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xec): undefined reference to `PyObject_CallObject'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `_object* matplotlibcpp::get_array<float>(std::vector<float, std::allocator<float> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x20): undefined reference to `PyList_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x7c): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIfEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x90): undefined reference to `PyList_SetItem'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `bool matplotlibcpp::plot<int, int>(std::vector<int, std::allocator<int> > const&, std::vector<int, std::allocator<int> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x7c): undefined reference to `PyString_FromString'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0x8c): undefined reference to `PyTuple_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xa8): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xbc): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xd0): undefined reference to `PyTuple_SetItem'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE[_ZN13matplotlibcpp4plotIiiEEbRKSt6vectorIT_SaIS2_EERKS1_IT0_SaIS7_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE]+0xec): undefined reference to `PyObject_CallObject'
/usr/bin/ld: CMakeFiles/fxlmstest.dir/Mains/fxlmstest.cpp.o: in function `_object* matplotlibcpp::get_array<int>(std::vector<int, std::allocator<int> > const&)':
fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x20): undefined reference to `PyList_New'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x80): undefined reference to `PyFloat_FromDouble'
/usr/bin/ld: fxlmstest.cpp:(.text._ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE[_ZN13matplotlibcpp9get_arrayIiEEP7_objectRKSt6vectorIT_SaIS4_EE]+0x94): undefined reference to `PyList_SetItem'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/fxlmstest.dir/build.make:178: fxlmstest] Error 1
make[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/fxlmstest.dir/all] Error 2
make: *** [Makefile:103: all] Error 2

之前怀疑是python版本或cmake版本的问题,apt升级cmake到最新,系统内当时有2.7 , 3, 3.7 三个不同版本,都用apt卸载后用源码安装的 python2.7环境,apt安装的python-dev。

目前查看系统,python2.7的相关头文件跟库所在目录及内容如下

pi@raspberrypi:/usr $ ls /usr/lib/python2.7
_abcoll.py          cgi.pyc                     dbhash.py            __future__.py       io.pyc                 multifile.py              platform.py     rfc822.py               sre_compile.py      tabnanny.pyc          UserList.py
_abcoll.pyc         cgitb.py                    dbhash.pyc           __future__.pyc      json                   multifile.pyc             platform.pyc    rfc822.pyc              sre_compile.pyc     tarfile.py            UserList.pyc
abc.py              cgitb.pyc                   decimal.py           genericpath.py      keyword.py             multiprocessing           plistlib.py     rlcompleter.py          sre_constants.py    tarfile.pyc           user.py
abc.pyc             chunk.py                    decimal.pyc          genericpath.pyc     keyword.pyc            mutex.py                  plistlib.pyc    rlcompleter.pyc         sre_constants.pyc   telnetlib.py          user.pyc
aifc.py             chunk.pyc                   difflib.py           getopt.py           lib2to3                mutex.pyc                 popen2.py       robotparser.py          sre_parse.py        telnetlib.pyc         UserString.py
aifc.pyc            cmd.py                      difflib.pyc          getopt.pyc          lib-dynload            netrc.py                  popen2.pyc      robotparser.pyc         sre_parse.pyc       tempfile.py           UserString.pyc
antigravity.py      cmd.pyc                     dircache.py          getpass.py          lib-tk                 netrc.pyc                 poplib.py       runpy.py                sre.py              tempfile.pyc          uuid.py
antigravity.pyc     codecs.py                   dircache.pyc         getpass.pyc         LICENSE.txt            new.py                    poplib.pyc      runpy.pyc               sre.pyc             test                  uuid.pyc
anydbm.py           codecs.pyc                  dis.py               gettext.py          linecache.py           new.pyc                   posixfile.py    sched.py                ssl.py              textwrap.py           uu.py
anydbm.pyc          codeop.py                   dis.pyc              gettext.pyc         linecache.pyc          nntplib.py                posixfile.pyc   sched.pyc               ssl.pyc             textwrap.pyc          uu.pyc
argparse.egg-info   codeop.pyc                  dist-packages        glob.py             locale.py              nntplib.pyc               posixpath.py    sets.py                 stat.py             this.py               warnings.py
argparse.py         code.py                     distutils            glob.pyc            locale.pyc             ntpath.py                 posixpath.pyc   sets.pyc                stat.pyc            this.pyc              warnings.pyc
argparse.pyc        code.pyc                    doctest.py           gzip.py             logging                ntpath.pyc                pprint.py       sgmllib.py              statvfs.py          _threading_local.py   wave.py
ast.py              collections.py              doctest.pyc          gzip.pyc            _LWPCookieJar.py       nturl2path.py             pprint.pyc      sgmllib.pyc             statvfs.pyc         _threading_local.pyc  wave.pyc
ast.pyc             collections.pyc             DocXMLRPCServer.py   hashlib.py          _LWPCookieJar.pyc      nturl2path.pyc            profile.py      sha.py                  StringIO.py         threading.py          weakref.py
asynchat.py         colorsys.py                 DocXMLRPCServer.pyc  hashlib.pyc         macpath.py             numbers.py                profile.pyc     sha.pyc                 StringIO.pyc        threading.pyc         weakref.pyc
asynchat.pyc        colorsys.pyc                dumbdbm.py           heapq.py            macpath.pyc            numbers.pyc               pstats.py       shelve.py               stringold.py        timeit.py             _weakrefset.py
asyncore.py         commands.py                 dumbdbm.pyc          heapq.pyc           macurl2path.py         opcode.py                 pstats.pyc      shelve.pyc              stringold.pyc       timeit.pyc            _weakrefset.pyc
asyncore.pyc        commands.pyc                dummy_threading.py   hmac.py             macurl2path.pyc        opcode.pyc                pty.py          shlex.py                stringprep.py       toaiff.py             webbrowser.py
atexit.py           compileall.py               dummy_threading.pyc  hmac.pyc            mailbox.py             optparse.py               pty.pyc         shlex.pyc               stringprep.pyc      toaiff.pyc            webbrowser.pyc
atexit.pyc          compileall.pyc              dummy_thread.py      hotshot             mailbox.pyc            optparse.pyc              pyclbr.py       shutil.py               string.py           tokenize.py           whichdb.py
audiodev.py         compiler                    dummy_thread.pyc     htmlentitydefs.py   mailcap.py             os2emxpath.py             pyclbr.pyc      shutil.pyc              string.pyc          tokenize.pyc          whichdb.pyc
audiodev.pyc        config-arm-linux-gnueabihf  email                htmlentitydefs.pyc  mailcap.pyc            os2emxpath.pyc            py_compile.py   SimpleHTTPServer.py     _strptime.py        token.py              wsgiref
base64.py           ConfigParser.py             encodings            htmllib.py          markupbase.py          os.py                     py_compile.pyc  SimpleHTTPServer.pyc    _strptime.pyc       token.pyc             wsgiref.egg-info
base64.pyc          ConfigParser.pyc            ensurepip            htmllib.pyc         markupbase.pyc         os.pyc                    pydoc_data      SimpleXMLRPCServer.py   struct.py           traceback.py          xdrlib.py
BaseHTTPServer.py   contextlib.py               filecmp.py           HTMLParser.py       md5.py                 _osx_support.py           pydoc.py        SimpleXMLRPCServer.pyc  struct.pyc          traceback.pyc         xdrlib.pyc
BaseHTTPServer.pyc  contextlib.pyc              filecmp.pyc          HTMLParser.pyc      md5.pyc                _osx_support.pyc          pydoc.pyc       sitecustomize.py        subprocess.py       trace.py              xml
Bastion.py          cookielib.py                fileinput.py         httplib.py          mhlib.py               pdb.doc                   _pyio.py        sitecustomize.pyc       subprocess.pyc      trace.pyc             xmllib.py
Bastion.pyc         cookielib.pyc               fileinput.pyc        httplib.pyc         mhlib.pyc              pdb.py                    _pyio.pyc       site.py                 sunaudio.py         tty.py                xmllib.pyc
bdb.py              Cookie.py                   fnmatch.py           ihooks.py           mimetools.py           pdb.pyc                   Queue.py        site.pyc                sunaudio.pyc        tty.pyc               xmlrpclib.py
bdb.pyc             Cookie.pyc                  fnmatch.pyc          ihooks.pyc          mimetools.pyc          __phello__.foo.py         Queue.pyc       smtpd.py                sunau.py            types.py              xmlrpclib.pyc
binhex.py           copy.py                     formatter.py         imaplib.py          mimetypes.py           __phello__.foo.pyc        quopri.py       smtpd.pyc               sunau.pyc           types.pyc             zipfile.py
binhex.pyc          copy.pyc                    formatter.pyc        imaplib.pyc         mimetypes.pyc          pickle.py                 quopri.pyc      smtplib.py              symbol.py           unittest              zipfile.pyc
bisect.py           copy_reg.py                 fpformat.py          imghdr.py           MimeWriter.py          pickle.pyc                random.py       smtplib.pyc             symbol.pyc          urllib2.py
bisect.pyc          copy_reg.pyc                fpformat.pyc         imghdr.pyc          MimeWriter.pyc         pickletools.py            random.pyc      sndhdr.py               symtable.py         urllib2.pyc
bsddb               cProfile.py                 fractions.py         importlib           mimify.py              pickletools.pyc           repr.py         sndhdr.pyc              symtable.pyc        urllib.py
calendar.py         cProfile.pyc                fractions.pyc        imputil.py          mimify.pyc             pipes.py                  repr.pyc        socket.py               _sysconfigdata.py   urllib.pyc
calendar.pyc        csv.py                      ftplib.py            imputil.pyc         modulefinder.py        pipes.pyc                 re.py           socket.pyc              _sysconfigdata.pyc  urlparse.py
CGIHTTPServer.py    csv.pyc                     ftplib.pyc           inspect.py          modulefinder.pyc       pkgutil.py                re.pyc          SocketServer.py         sysconfig.py        urlparse.pyc
CGIHTTPServer.pyc   ctypes                      functools.py         inspect.pyc         _MozillaCookieJar.py   pkgutil.pyc               rexec.py        SocketServer.pyc        sysconfig.pyc       UserDict.py
cgi.py              curses                      functools.pyc        io.py               _MozillaCookieJar.pyc  plat-arm-linux-gnueabihf  rexec.pyc       sqlite3                 tabnanny.py         UserDict.pyc

求处理方案,谢谢各位!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文