我正在开展一个无人机项目,我的Raspberry Pi 2 B出现了问题。当我尝试安装vikit_common时,我已经这个在屏幕上:
pi @ raspberrypi~ / workspace / rpg_vikit / vikit_common / build $ cmake ..
-- Eigen found (include: /usr/include/eigen3)
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/workspace/rpg_vikit/vikit_common/build
pi@raspberrypi ~/workspace/rpg_vikit/vikit_common/build $ make
[ 7%] Building CXX object CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o
cc1plus: error: bad value (native) for -march switch
cc1plus: error: unrecognized command line option ‘-mmmx’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse2’
cc1plus: error: unrecognized command line option ‘-msse3’
cc1plus: error: unrecognized command line option ‘-mssse3’
cc1plus: error: bad value (native) for -march switch
cc1plus: error: unrecognized command line option ‘-mmmx’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse’
cc1plus: error: unrecognized command line option ‘-msse2’
cc1plus: error: unrecognized command line option ‘-msse3’
cc1plus: error: unrecognized command line option ‘-mssse3’
CMakeFiles/vikit_common.dir/build.make:57: recipe for target 'CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o' failed
make[2]: *** [CMakeFiles/vikit_common.dir/src/atan_camera.cpp.o] Error 1
CMakeFiles/Makefile2:168: recipe for target 'CMakeFiles/vikit_common.dir/all' failed
make[1]: *** [CMakeFiles/vikit_common.dir/all] Error 2
Makefile:116: recipe for target 'all' failed
make: *** [all] Error 2
我安装了Cmake(sudo apt-get cmake),Gcc(4.6.3)和OpenCV。
我该如何解决这个问题?
答案 0 :(得分:0)
显然您的cmake
配置不正确
快速gcc 4.6.3
男人说
-march =
指定目标ARM体系结构的名称。 GCC使用此名称来确定何时可以使用哪种指令 生成汇编代码。此选项可与结合使用 或者代替`-mcpu ='选项。允许的名字是:'armv2','armv2a','armv3','armv3m','armv4','armv4t','armv5','armv5t','armv5e','armv5te','armv6' ,'armv6j','armv6t2','armv6z','armv6zk','armv6-m','armv7','armv7-a','armv7-r','armv7-m','iwmmxt',' iwmmxt2','ep9312'
首先看起来-march
的值不正确。
请检查您的cmake
配置