【问题标题】:Vikit_common - Installation failed - Raspberry Pi 2 BVikit_common - 安装失败 - Raspberry Pi 2 B
【发布时间】:2015-09-16 14:43:36
【问题描述】:

我正在做一个无人机项目,但我的 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。

我该如何解决这个问题?

【问题讨论】:

    标签: c++ linux opencv


    【解决方案1】:

    显然您的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 配置

    【讨论】:

      猜你喜欢
      • 2016-10-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多