c++ - Vikit_common - 安装失败 - Raspberry Pi 2 B

标签 c++ linux opencv

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

我该如何解决这个问题?

最佳答案

显然你的 cmake 配置不正确

一个快速的 gcc 4.6.3 人说

-march=

This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can use when generating assembly code. This option can be used in conjunction with or instead of the `-mcpu=' option. Permissable names are: ‘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 配置

关于c++ - Vikit_common - 安装失败 - Raspberry Pi 2 B,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32611844/

相关文章:

linux - 线程终止时是否调用了 `SIGKILL`?

C 中用于 SSHD 的自定义 PAM

c++ - 如何从 Mask 中获取减去的视频

c++ - 即使我将单个节点设置为 NULL 并删除它们,递归清除二叉树也不起作用

c++ - 合并 2 个 wav 文件后生成的波形的采样率

c++ - 安全删除窗口子类化?

image - 如何不仅用直方图比较图像?

c++ - 复制构造函数

linux - 具有多个参数的 xargs

image-processing - 在图像/图案中查找子图案位置