Ask Your Question

OpenCV master branch compilation issue

asked 2014-05-18 14:05:27 -0600

Abid Rahman K gravatar image


I am trying to compile OpenCV from master branch. I don't need any GPU functionalities. So I passed following CMake statement:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_cuda=OFF -D BUILD_opencv_cudaarithm=OFF -D BUILD_opencv_cudabgsegm=OFF -D BUILD_opencv_cudacodec=OFF -D BUILD_opencv_cudafeatures2d=OFF -D BUILD_opencv_cudafilters=OFF -D BUILD_opencv_cudaimgproc=OFF -D BUILD_opencv_cudalegacy=OFF -D BUILD_opencv_cudaoptflow=OFF -D BUILD_opencv_cudastereo=OFF -D BUILD_opencv_cudawarping=OFF -D ANT_EXECUTABLE=NO -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D BUILD_DOCS=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF -D WITH_VTK=OFF ..

But I get the following error on make

[ 39%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/opencl_kernels.cpp.o
Linking CXX shared library ../../lib/
/usr/bin/ld: cannot find -lopencv_cudev
collect2: error: ld returned 1 exit status
make[2]: *** [lib/] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
make: *** [all] Error 2

What is this error? How can I solve it?

Output of CMake statement is here:

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-18 22:13:20 -0600

Abid Rahman K gravatar image

It is a known bug : #3430 (

Temporary solution given:

Remove OPTIONAL opencv_cudev in the file modules/core/CMakeLists.txt

Clean CMake Cache and run it again.

edit flag offensive delete link more

Question Tools


Asked: 2014-05-18 14:05:27 -0600

Seen: 1,619 times

Last updated: May 18 '14