【发布时间】:2019-01-13 07:49:09
【问题描述】:
我正在尝试为 Tinker Board - 基于 ARM 的处理器 - Rockchip RK3288 交叉编译 opencv 4.0/3.4
我使用 Ubuntu 18.04 作为主机。
我几乎遵循here 提到的所有内容。
但是当我尝试使用下面的 cmake 时:
mike@mike-laptop:~/opencv-3.4.5/build$ cmake -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/arm-gnueabi.toolchain.cmake ../ I am getting the below error:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags:
The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /usr/bin/c++ Build flags: -mthumb;;-fdata-sections;-Wa,--noexecstack;-fsigned-char;-Wno-psabi Id flags: -c
The output was: 1 c++: error: unrecognized command line option ‘-mthumb’; did you mean ‘-mtbm’?
还有大量消息
【问题讨论】:
-
我的
$PATH中没有 arm 编译器,成功重现了您的错误。您是否按照说明安装了适当的工具链? (sudo apt-get install gcc-arm-linux-gnueabi)。你能确认安装的交叉编译器在你的$PATH中,方法是在终端中输入arm-并按tab 自动完成,看看它是否建议arm-eabi-gcc和类似的东西?
标签: c++ opencv arm cross-compiling ubuntu-18.04