Ask Your Question

Revision history [back]

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/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libXext.so)

-- VTK support: NO

-- Media I/O: -- ZLib: /usr/lib/x86_64-linux-gnu/libz.so (ver 1.2.8) -- JPEG: /usr/lib/x86_64-linux-gnu/libjpeg.so (ver ) -- PNG: /usr/lib/x86_64-linux-gnu/libpng.so (ver 1.2.50) -- TIFF: /usr/lib/x86_64-linux-gnu/libtiff.so (ver 42 - 4.0.3) -- JPEG 2000: /usr/lib/x86_64-linux-gnu/libjasper.so (ver 1.900.1)

-- OpenEXR: /usr/lib/x86_64-linux-gnu/libImath.so /usr/lib/x86_64-linux-gnu/libIlmImf.so /usr/lib/x86_64-linux-gnu/libIex.so /usr/lib/x86_64-linux-gnu/libHalf.so /usr/lib/x86_64-linux-gnu/libIlmThread.so (ver 1.6.1)

-- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: YES (ver 2.2.1) -- FFMPEG: YES -- codec: YES (ver 54.35.0) -- format: YES (ver 54.20.4) -- util: YES (ver 52.3.0) -- swscale: YES (ver 2.1.1) -- gentoo-style: YES -- GStreamer:
-- base: YES (ver 0.10.36) -- app: YES (ver 0.10.36) -- video: YES (ver 0.10.36) -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- PvAPI: NO -- GigEVisionSDK: NO -- UniCap: NO -- UniCap ucil: NO -- V4L/V4L2: Using libv4l (ver 1.0.1) -- XIMEA: NO

-- Xine: NO

-- Other third-party libraries: -- Use IPP: NO -- Use Eigen: NO -- Use TBB: YES (ver 4.2 interface 7000) -- Use OpenMP: NO -- Use GCD NO -- Use Concurrency NO -- Use C=: NO -- Use Cuda: YES (ver 6.5)

-- Use OpenCL: YES

-- NVIDIA CUDA -- Use CUFFT: YES -- Use CUBLAS: NO -- USE NVCUVID: NO -- NVIDIA GPU arch: 30 -- NVIDIA PTX archs: 30

-- Use fast math: NO

-- OpenCL: -- Version: dynamic -- Include path: /home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/3rdparty/include/opencl/1.2 -- Use AMD FFT: NO

-- Use AMD BLAS: NO

-- Python: -- Interpreter: /usr/bin/python2 (ver 2.7.6) -- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6) -- numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2)

-- packages path: lib/python2.7/dist-packages

-- Java: -- ant: NO -- JNI: NO

-- Java tests: NO

-- Documentation: -- Build Documentation: NO -- Sphinx: NO

-- PdfLaTeX compiler: /usr/bin/pdflatex

-- Tests and samples: -- Tests: YES -- Performance tests: YES

-- C/C++ Examples: YES

-- Install path: /usr/local

-- cvconfig.h is in: /home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/release


OpenCV make error:

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(51): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(52): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(53): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(54): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(55): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(56): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(57): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(58): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(61): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(62): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(63): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(64): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(65): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(66): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(67): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(68): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(119): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(120): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(121): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(122): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(123): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(124): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(125): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(126): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(127): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(128): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(129): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(130): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(131): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(132): error: a storage class is not allowed in an explicit specialization

/home/richard/Documents/Uni_Work/CS310/opencv-2.4.9/modules/gpu/src/nvidia/core/NCVPixelOperations.hpp(133): error: a storage class is not allowed in an explicit specialization