日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

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

發布時間:2023/12/2 python 49 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python连不上树莓派_树莓派respberry中cmake编译链接python2.7库不成功,求教 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

本人在樹莓派pi3平臺上,下載respberry 5.4 lite 編譯一個github上的項目,該項目用cmake管理,目前看到 鏈接庫階段不成功。

請教如何調整cmake的鏈接庫目錄,或是怎樣直接調整生成的makefile,用于連編

是一個主動降噪的項目,源碼用到了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, std::allocator > 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(std::vector > const&, std::vector > const&, std::__cxx11::basic_string, std::allocator > 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(std::vector > const&, std::vector > const&, std::__cxx11::basic_string, std::allocator > 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(std::vector > 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(std::vector > const&, std::vector > const&, std::__cxx11::basic_string, std::allocator > 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(std::vector > 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

求處理方案,謝謝各位!

總結

以上是生活随笔為你收集整理的python连不上树莓派_树莓派respberry中cmake编译链接python2.7库不成功,求教的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。