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編譯過嘗試,它給了同樣的錯誤 –