2
OS安装来自Caffe:Ubuntu的16.04 CUDA 7.5 Cudnn:5有困难在Ubuntu 16.04
我下面this教程与GPU安装朱古力。 在这里,我想要安装opencv 3.1。但是,当CUDA已经安装在系统中时,opencv的编译会产生错误。
我得到试图make
的OpenCV 3.1的错误是:
/usr/include/string.h: In function ‘void* __mempcpy_inline(void*, const void*, size_t)’:
/usr/include/string.h:652:42: error: ‘memcpy’ was not declared in this scope
return (char *) memcpy (__dest, __src, __n) + __n;
^
CMake Error at cuda_compile_generated_gpu_mat.cu.o.cmake:266 (message):
Error generating file
/home/cortana/Downloads/opencv-3.1.0/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_gpu_mat.cu.o
modules/core/CMakeFiles/opencv_core.dir/build.make:63: recipe for target 'modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o' failed
make[2]: *** [modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.o] Error 1
CMakeFiles/Makefile2:1505: recipe for target 'modules/core/CMakeFiles/opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
我曾尝试通过将线set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")
它改变的OpenCV 3.1的CMakeLists.txt。此外,我检查了更改/usr/include/string.h
提供的here的建议。但是我已经有了该文件的更新版本。 我无法构建opencv 3.1,因此Caffe。
CUDA 7.5不支持Ubuntu的16或GCC 5 – talonmies
我试着用GCC 4.8编译过尝试,它给了同样的错误 –