If I configure CMake without CUDA (uncheck with WITH_CUDA, and uncheck all BUILD_opencv_cudaxxx modules), everything works fine. However, when I include CUDA - I have one issue in CMake, and if I continue to build, I get many errors.
The CMake error is CUDA_NVCUVENC_LIBRARY NOTFOUND - and searching for this issue it appears that NVIDIA no longer offers this library - there seems to be a bug report on this. - Don't know if this causes the problems I am experiencing wih the build.
I get a number of errors - all with a cryptic message
The system was unable to find the specified registry key or value - file CUSTOMBUILD
Please help - building without CUDA support is useless for my needs.
----EDIT----------
I have posted below the output from just attempting to build Opencv_core. You will notice that it listsJava, Python and Matlab as missing, none of which is in the computer, and I do not ask for any of them. Do I need to change anything in my CMake file?
1>------ Build started: Project: opencv_core, Configuration: Debug x64 ------
1> Building NVCC (Device) object modules/core/CMakeFiles/cuda_compile.dir/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj
1> gpu_mat.cu
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1>D:\Downloads\opencv\sources\modules\core\include\opencv2/core/base.hpp(342): warning : function declared with "noreturn" does return
1>
1>
1>
1>
1>
1> gpu_mat.cu
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/util/atomic.hpp(84): warning C4505: 'cv::cudev::atomicAdd' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/util/atomic.hpp(114): warning C4505: 'cv::cudev::atomicMin' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/util/atomic.hpp(132): warning C4505: 'cv::cudev::atomicMin' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/util/atomic.hpp(162): warning C4505: 'cv::cudev::atomicMax' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/util/atomic.hpp(180): warning C4505: 'cv::cudev::atomicMax' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev\functional\detail/color_cvt.hpp(942): warning C4505: 'cv::cudev::color_cvt_detail::LabCbrt_b' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev\functional\detail/color_cvt.hpp(948): warning C4505: 'cv::cudev::color_cvt_detail::splineInterpolate' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev\grid\detail/integral.hpp(159): warning C4505: 'cv::cudev::integral_detail::int_to_uchar4' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/ptr2d/warping.hpp(86): warning C4505: 'cv::cudev::affineMap' : unreferenced local function has been removed
1>
1>d:\Downloads\opencv\sources\modules\cudev\include\opencv2\cudev/ptr2d/warping.hpp(134): warning C4505: 'cv::cudev::perspectiveMap' : unreferenced local function has been removed
1>
1> Building Custom Rule D:/Downloads/opencv/sources/modules/core/CMakeLists.txt
1> CMake is re-running because D:\Downloads\opencv\build\modules\core\CMakeFiles\generate.stamp is out-of-date.
1> the file 'D:/Downloads/opencv/build/modules/core/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_gpu_mat.cu.obj.depend'
1> is newer than 'D:\Downloads\opencv\build\modules\core\CMakeFiles\generate.stamp.depend'
1> result='-1'
1> -- found IPP (ICV version): 8.2.1 [8.2.1]
1> -- at: D:/Downloads/opencv/sources/3rdparty/ippicv/unpack/ippicv_win
1> -- CUDA detected: 7.5
1> -- CUDA NVCC target flags: -gencode;arch=compute_20,code=sm_20;-gencode;arch=compute_20,code=sm_21;-gencode;arch=compute_30,code=sm_30;-gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_30,code=compute_30
1> -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.7")
1> -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.6")
1> -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.4")
1> -- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "3.2")
1> -- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH)
1>CUSTOMBUILD : error : The system was unable to find the specified registry key or value.
1>
1>CUSTOMBUILD : error : The system was unable to find the specified registry key or value.
1>
1> -- Could NOT find Matlab (missing: MATLAB_MEX_SCRIPT MATLAB_INCLUDE_DIRS MATLAB_ROOT_DIR MATLAB_LIBRARIES MATLAB_LIBRARY_DIRS MATLAB_MEXEXT MATLAB_ARCH MATLAB_BIN)
1> -- videoio: Removing WinRT API headers by default
1> --
1> -- General configuration for OpenCV 3.0.0 =====================================
1> -- Version control: unknown
1> --
1> -- Platform:
1> -- Host: Windows 6.2 AMD64
1> -- CMake: 3.3.1
1> -- CMake generator: Visual Studio 11 2012 Win64
1> -- CMake build tool: C:/Windows/Microsoft.NET/Framework/v4.0.30319/MSBuild.exe
1> -- MSVC: 1700
1> --
1> -- C/C++:
1> -- Built as dynamic libs?: NO
1> -- C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe (ver 17.0.61030.0)
1> -- C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /MT /O2 /Ob2 /D NDEBUG /Zi
1> -- C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /MP8 /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1
1> -- C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin/x86_amd64/cl.exe
1> -- C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /MT /O2 /Ob2 /D NDEBUG /Zi
1> -- C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP8 /D_DEBUG /MTd /Zi /Ob0 /Od /RTC1
1> -- Linker flags (Release): /machine:x64 /NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /INCREMENTAL:NO /debug /NODEFAULTLIB:libcmtd.lib
1> -- Linker flags (Debug): /machine:x64 /NODEFAULTLIB:atlthunk.lib /NODEFAULTLIB:msvcrt.lib /NODEFAULTLIB:msvcrtd.lib /debug /INCREMENTAL /NODEFAULTLIB:libcmt.lib
1> -- Precompiled headers: YES
1> -- Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32 C:/Dev/libwebp-0.4.3-windows-x64/lib/libwebp.lib vfw32 cudart nppc nppi npps cublas cufft
1> -- 3rdparty dependencies: zlib libjpeg libpng libtiff libjasper IlmImf ippicv
1> --
1> -- OpenCV modules:
1> -- To be built: hal cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping imgcodecs photo shape videoio highgui objdetect features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo stitching superres videostab
1> -- Disabled: cudacodec ts world
1> -- Disabled by dependency: -
1> -- Unavailable: java python2 python3 viz
1> --
1> -- Windows RT support: NO
1> --
1> -- GUI:
1> -- QT: NO
1> -- Win32 UI: YES
1> -- OpenGL support: NO
1> -- VTK support: NO
1> --
1> -- Media I/O:
1> -- ZLib: build (ver 1.2.8)
1> -- JPEG: build (ver 90)
1> -- WEBP: C:/Dev/libwebp-0.4.3-windows-x64/lib/libwebp.lib (ver encoder: 0x0202)
1> -- PNG: build (ver 1.5.12)
1> -- TIFF: build (ver 42 - 4.0.2)
1> -- JPEG 2000: build (ver 1.900.1)
1> -- OpenEXR: build (ver 1.7.1)
1> -- GDAL: NO
1> --
1> -- Video I/O:
1> -- Video for Windows: YES
1> -- DC1394 1.x: NO
1> -- DC1394 2.x: NO
1> -- FFMPEG: YES (prebuilt binaries)
1> -- codec: YES (ver 55.18.102)
1> -- format: YES (ver 55.12.100)
1> -- util: YES (ver 52.38.100)
1> -- swscale: YES (ver 2.3.100)
1> -- resample: NO
1> -- gentoo-style: YES
1> -- OpenNI: NO
1> -- OpenNI PrimeSensor Modules: NO
1> -- OpenNI2: NO
1> -- PvAPI: NO
1> -- GigEVisionSDK: NO
1> -- DirectShow: YES
1> -- Media Foundation: NO
1> -- XIMEA: NO
1> -- Intel PerC: NO
1> --
1> -- Other third-party libraries:
1> -- Use IPP: 8.2.1 [8.2.1]
1> -- at: D:/Downloads/opencv/sources/3rdparty/ippicv/unpack/ippicv_win
1> -- Use IPP Async: NO
1> -- Use Eigen: YES (ver 3.2.5)
1> -- Use TBB: YES (ver 4.4 interface 9000)
1> -- Use OpenMP: NO
1> -- Use GCD NO
1> -- Use Concurrency NO
1> -- Use C=: NO
1> -- Use pthreads for parallel for:
1> -- NO
1> -- Use Cuda: YES (ver 7.5)
1> -- Use OpenCL: YES
1> --
1> -- NVIDIA CUDA
1> -- Use CUFFT: YES
1> -- Use CUBLAS: YES
1> -- USE NVCUVID: NO
1> -- NVIDIA GPU arch: 20 21 30 35
1> -- NVIDIA PTX archs: 30
1> -- Use fast math: NO
1> --
1> -- OpenCL:
1> -- Version: dynamic
1> -- Include path: D:/Downloads/opencv/sources/3rdparty/include/opencl/1.2 C:/Dev/clFFT-2.6.1-Windows-x64/include C:/Dev/clBLAS-2.6.0-Windows-x64/include
1> -- Use AMDFFT: YES
1> -- Use AMDBLAS: YES
1> --
1> -- Python 2:
1> -- Interpreter: NO
1> --
1> -- Python 3:
1> -- Interpreter: NO
1> --
1> -- Python (for build): NO
1> --
1> -- Java:
1> -- ant: NO
1> -- JNI: NO
1> -- Java wrappers: NO
1> -- Java tests: NO
1> --
1> -- Matlab:
1> -- mex: NO
1> --
1> -- Tests and samples:
1> -- Tests: NO
1> -- Performance tests: NO
1> -- C/C++ Examples: NO
1> --
1> -- Install path: C:/Dev/OpenCV
1> --
1> -- cvconfig.h is in: D:/Downloads/opencv/build
1> -- -----------------------------------------------------------------
1> --
1> -- Configuring done
1> -- Generating done
1> -- Build files have been written to: D:/Downloads/opencv/build
1> Generating opencl_kernels_core.cpp, opencl_kernels_core.hpp
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
====================