OpenCV 2.4.9 and Cuda 6.5 not making on Ubuntu 14.04 LTS
Hello,
I am having a lot of trouble making OpenCV with Cuda, as when compiling the libraries, compiler errors are given.
I install Cuda and restart the machine as prompted. I then do cmake to make all the files, which says that it has found Cuda and that it is version 6.5. The command and output is bellow. The trouble starts when I actually run make. When I do, it normally gets so far through, then produces the same set of errors. This can also found bellow.
I can make and compile the libraries if I don't include the Cuda flags in the OpenCV command, and I know Cuda works as the sample programs run perfectly. When trying to find anything about this issue, all I have found is a bug report that got patched 4 months ago, so not sure what is happening. The bug report can be found here.
I have re-downloaded both Cuda and OpenCV.
Sorry about the length of the post, I'm getting really despite!
OpenCV cmake command:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_CUDA=ON -D CUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda/" ..
OpenCV cmake return:
-- General configuration for OpenCV 2.4.9 =====================================
-- Version control: 8fe9dad-dirty
-- Platform: -- Host: Linux 3.13.0-34-generic x86_64 -- CMake: 2.8.12.2 -- CMake generator: Unix Makefiles -- CMake build tool: /usr/bin/make
-- Configuration: RELEASE
-- C/C++:
-- Built as dynamic libs?: YES
-- C++ Compiler: /usr/bin/c++ (ver 4.8.2)
-- C++ flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C++ flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- C Compiler: /usr/bin/cc
-- C flags (Release): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fsigned-char -W -Wall -Werror=return-type -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wno-narrowing -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -msse -msse2 -msse3 -ffunction-sections -g -O0 -DDEBUG -D_DEBUG
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: YES
-- OpenCV modules: -- To be built: core flann imgproc highgui features2d calib3d ml video legacy objdetect photo gpu ocl nonfree contrib python stitching superres ts videostab -- Disabled: world -- Disabled by dependency: -
-- Unavailable: androidcamera dynamicuda java viz
-- GUI: -- QT 4.x: YES (ver 4.8.6 EDITION = OpenSource) -- QT OpenGL support: YES (/usr/lib/x86_64-linux-gnu/libQtOpenGL.so) -- OpenGL support: YES (/usr/lib/x86_64-linux-gnu/libGLU.so /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libSM.so /usr/lib/x86_64-linux-gnu/libICE.so /usr/lib ...
I wrote an answer but I didn't read all of the question but your answer is in your question. The bug page is showing what has to be different at the NVCPixelOperations.hpp <a href=http://code.opencv.org/projects/opencv/repository/revisions/feb74b125d7923c0bc11054b66863e1e9f753141/diff/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp>difference</a> page
Try specifying the compute capability of your card. If not than all cuda supported interfaces are built and probably your cards cannot handle one of those. This is done by adding -D CUDA_ARCH_BIN="3.0" in my case.