构建OpenCV的-2.4.5 CARMA问题 [英] Build the Opencv-2.4.5 For CARMA Issue
问题描述
我已经成功完成用的CMake下列选项。
I have successfully Done Cmake with following option.
$cmake -DGCC_COMPILER_VERSION="4.5" -DSOFTFP=ON -DUSE_NEON=ON -DCMAKE_SKIP_RPATH=ON -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.0 -DCUDA_ARCH_BIN="2.1(2.0)" -DCUDA_ARCH_PTX="" -DWITH_CUDA=ON -DWITH_CUBLAS=ON -DWITH_TBB=ON -DBUILD_opencv_python=OFF -DBUILD_TBB=ON -DBUILD_ZLIB=ON -DBUILD_TIFF=ON -DBUILD_JASPER=ON -DBUILD_JPEG=ON -DBUILD_PNG=ON -DBUILD_OPENEXR=ON -DCMAKE_TOOLCHAIN_FILE=/home/intecore/carma/opencv-2.4.5/platforms/linux/arm-gnueabi.toolchain.cmake /home/intecore/carma/opencv-2.4.5
但经过23%是发生在化妆的问题,就是
But problem is occurred in make after 23% that is
[ 23%] Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
cc1plus: error: unrecognized command line option ‘-mthumb’
cc1plus: error: unrecognized command line option ‘-mfpu=neon’
CMake Error at cuda_compile_generated_matrix_operations.cu.o.cmake:198 (message):
Error generating
/home/intecore/carma/opencv-2.4.5/platforms/linux/carma_build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_matrix_operations.cu.o] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2
我不理解,我做犯的错误,请给我的解决方案。
I am not understanding where I made made mistake please give me solution.
推荐答案
好像你正在使用旧版本的CMake的。
It seems like you are using old version of CMake.
交叉编译使用CUDA至少需要2.8.10版本的CMake。它不是在Ubuntu仓库中。
Cross-compilation with CUDA requires at least 2.8.10 CMake version. It is not available in Ubuntu repository.
请从网站上下载最新的CMake /cmake/resources/software.html
Please download the latest CMake from their website: http://www.cmake.org/cmake/resources/software.html
下面是CARMA编译指令:
的http://$c$c.opencv.org/projects/opencv/wiki/CARMA_platform_compilation_and_testing
Here is instruction for CARMA compilation: http://code.opencv.org/projects/opencv/wiki/CARMA_platform_compilation_and_testing
OpenCV的可使用GTK后端UI支持进行编译。
OpenCV can be compiled with UI support using GTK back-end.
-
目标设备上安装GTK。
Install GTK on target device.
的apt-get安装libgtk2.0-dev的
apt-get install libgtk2.0-dev
在主机(所需的头文件)安装GTK。
Install GTK on host (for required header files).
的apt-get安装libgtk2.0-dev的
apt-get install libgtk2.0-dev
复制 / lib中/ ARM-Linux的gnueabi
和 / usr / lib目录/ ARM-Linux的gnueabi
从目标文件夹到主机的相同位置。
Copy /lib/arm-linux-gnueabi
and /usr/lib/arm-linux-gnueabi
folders from target to host to the same location.
在除了上述两个目录,在目标复制从 / usr / lib目录
的所有文件复制到 / usr / lib目录/臂Linux的gnueabi
主机上。
In addition to the two directories above, copy all files from /usr/lib
on target to the /usr/lib/arm-linux-gnueabi
on host machine.
安装 pkg配置臂-Linux的gnueabi
包装内的主机。
的apt-get安装的pkg配置臂-Linux的gnueabi
apt-get install pkg-config-arm-linux-gnueabi
接下来的参数添加到CMake的命令行:
Add next parameters to cmake command line:
-DPKG_CONFIG_EXECUTABLE =的/ usr / bin中/ ARM-Linux的gnueabi-pkg配置-DWITH_GTK = ON
-DPKG_CONFIG_EXECUTABLE=/usr/bin/arm-linux-gnueabi-pkg-config -DWITH_GTK=ON
这篇关于构建OpenCV的-2.4.5 CARMA问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!