Ask Your Question

Revision history [back]

Opencv4.2.0 dnn Module with CUDA support Issue #https://github.com/opencv/opencv/issues/17321

https://github.com/opencv/opencv/issues/17321

System information (version) OpenCV => 4.2.0 (using wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip) Operating System / Platform => Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-1020-azure x86_64) wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip Tesla K80 CUDA Version: 10.0 (cuda -> /usr/local/cuda-10.0) Cudnn : V7.6.5 using below Cmake commond cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D OPENCV_ENABLE_NONFREE=ON -D CUDNN_LIBRARY=/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5 -D WITH_CUDA=ON -D WITH_CUDNN=ON -D OPENCV_DNN_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D CUDA_ARCH_BIN=6.1 -D WITH_CUBLAS=1 -D OPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules -D HAVE_opencv_python3=ON -D PYTHON_EXECUTABLE=/.virtualenvs/opencv_vmadmin/bin/python -D BUILD_EXAMPLES=ON ..

I tried with latest opencv4.3.0 and opencv_contrib4.3.0 but getting below error. However, make -jX command works for me and got [100%] Built target opencv_python3. but for sudo make install I am getting below error.

[ 39%] Built target opencv_test_dnn [ 39%] Linking CXX shared library ../../lib/libopencv_dnn_superres.so [ 39%] Built target opencv_dnn_superres [ 39%] Linking CXX executable ../../bin/example_dnn_superres_dnn_superres /usr/bin/ld: warning: libcublas.so.10.0, needed by ../../lib/libopencv_dnn.so.4.3.0, not found (try using -rpath or -rpath-link) ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to `[email protected]' collect2: error: ld returned 1 exit status modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/build.make:93: recipe for target 'bin/example_dnn_superres_dnn_superres' failed make[2]: * [bin/example_dnn_superres_dnn_superres] Error 1 CMakeFiles/Makefile2:5787: recipe for target 'modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/all' failed make[1]: [modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/all] Error 2 Makefile:162: recipe for target 'all' failed make: ** [all] Error 2

Opencv4.2.0 dnn Module with CUDA support Issue #https://github.com/opencv/opencv/issues/17321

https://github.com/opencv/opencv/issues/17321

An error:

#https://github.com/opencv/opencv/issues/17321
 System information (version)
OpenCV => 4.2.0 (using wget -O opencv.zip https://github.com/opencv/opencv/archive/4.2.0.zip)
Operating System / Platform => Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-1020-azure x86_64)
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/4.2.0.zip
Tesla K80
CUDA Version: 10.0 (cuda -> /usr/local/cuda-10.0)
Cudnn : V7.6.5

using below Cmake commond commond:

cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D INSTALL_PYTHON_EXAMPLES=ON
-D INSTALL_C_EXAMPLES=OFF
-D OPENCV_ENABLE_NONFREE=ON
-D CUDNN_LIBRARY=/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
-D WITH_CUDA=ON
-D WITH_CUDNN=ON
-D OPENCV_DNN_CUDA=ON
-D ENABLE_FAST_MATH=1
-D CUDA_FAST_MATH=1
-D CUDA_ARCH_BIN=6.1
-D WITH_CUBLAS=1
-D OPENCV_EXTRA_MODULES_PATH=/opencv_contrib/modules
-D HAVE_opencv_python3=ON
-D PYTHON_EXECUTABLE=/.virtualenvs/opencv_vmadmin/bin/python
-D BUILD_EXAMPLES=ON ..

..

I tried with latest opencv4.3.0 and opencv_contrib4.3.0 but getting below error. However, make -jX command works for me and got [100%] Built target opencv_python3. but for sudo make install I am getting below error.

[ 39%] Built target opencv_test_dnn
[ 39%] Linking CXX shared library ../../lib/libopencv_dnn_superres.so
[ 39%] Built target opencv_dnn_superres
[ 39%] Linking CXX executable ../../bin/example_dnn_superres_dnn_superres
/usr/bin/ld: warning: libcublas.so.10.0, needed by ../../lib/libopencv_dnn.so.4.3.0, not found (try using -rpath or -rpath-link)
../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]'
../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]' ../../lib/libopencv_dnn.so.4.3.0: undefined reference to [email protected]'
../../lib/libopencv_dnn.so.4.3.0: undefined reference to `[email protected]'
collect2: error: ld returned 1 exit status
modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/build.make:93: recipe for target 'bin/example_dnn_superres_dnn_superres' failed
make[2]: * *** [bin/example_dnn_superres_dnn_superres] Error 1
CMakeFiles/Makefile2:5787: recipe for target 'modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/all' failed
make[1]:  *** [modules/dnn_superres/CMakeFiles/example_dnn_superres_dnn_superres.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: ** *** [all] Error 2

2