Not able to install OpenCV3.1 in Ubuntu16.04 (CUDA 8.0)

asked 2016-08-23 12:34:33 -0500

codeAC29 gravatar image

I followed instruction from http://docs.opencv.org/3.1.0/d7/d9f/t... and when I tried to install I got following error:

[ 71%] Built target opencv_createsamples

[ 71%] Building NVCC (Device) object modules/cudastereo/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_disparity_bilateral_filter.cu.o

[ 71%] Building NVCC (Device) object modules/cudastereo/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_stereobm.cu.o

/home/Installations/opencv/modules/cudafilters/src/cuda/row_filter.hpp(122): error: identifier "__cuda_local_var_34666_18_lon_const_src_row" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00006c68_00000000-38_row_filter.32sc3.compute_50.cpp3.i".

CMake Error at cuda_compile_generated_row_filter.32sc3.cu.o.cmake:264 (message):

Error generating file

/home/Installations/opencv/build/modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/./cuda_compile_generated_row_filter.32sc3.cu.o

modules/cudafilters/CMakeFiles/opencv_cudafilters.dir/build.make:266: recipe for target 'modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_row_filter.32sc3.cu.o' failed

make[2]: * [modules/cudafilters/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_row_filter.32sc3.cu.o] Error 1

make[2]: * Waiting for unfinished jobs....

Scanning dependencies of target opencv_cudastereo

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_cudastereo.dir/src/util.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_cudastereo.dir/src/stereobp.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_cudastereo.dir/src/stereobm.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_cudastereo.dir/src/disparity_bilateral_filter.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_cudastereo.dir/src/stereocsbp.cpp.o

[ 71%] Linking CXX shared library ../../lib/libopencv_cudastereo.so

[ 71%] Built target opencv_cudastereo

Scanning dependencies of target opencv_test_cudastereo

Scanning dependencies of target opencv_perf_cudastereo

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_test_cudastereo.dir/test/test_stereo.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_test_cudastereo.dir/test/test_main.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_perf_cudastereo.dir/perf/perf_main.cpp.o

[ 71%] Building CXX object modules/cudastereo/CMakeFiles/opencv_perf_cudastereo.dir/perf/perf_stereo.cpp.o

[ 71%] Linking CXX executable ../../bin/opencv_test_cudastereo

[ 71%] Built target opencv_test_cudastereo

[ 71%] Linking CXX executable ../../bin/opencv_perf_cudastereo

[ 71%] Built target opencv_perf_cudastereo

CMakeFiles/Makefile2:4336: recipe for target 'modules/cudafilters/CMakeFiles/opencv_cudafilters.dir/all' failed

make[1]: * [modules/cudafilters/CMakeFiles/opencv_cudafilters.dir/all] Error 2

Makefile:160: recipe for target 'all' failed

make: * [all] Error 2

edit retag flag offensive close merge delete

Comments

1

This means that you are trying to build a CUDA version not supported for your GPU card. Look up the compute capability of the card and then add -D CUDA_ARCH_BIN="3.0" (replacing the number with your compute capability)

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-24 06:39:03 -0500 )edit

Try this cmake lines which the compute capability changed to that of yours cmake -D CUDA_ARCH_BIN=3.5 -D CUDA_ARCH_PTX=3.5 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 BUILD_TIFF=ON -D WITH_QT=ON -D WITH_OPENGL=ON ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D CUDA_GENERATION=Kepler -D CUDA_NVCC_FLAGS="-D_FORCE_INLINES" ..

lm35 gravatar imagelm35 ( 2016-10-20 05:58:16 -0500 )edit