I am building OpenCV 4.5.2 with the cudadnn support on Ubuntu 20.04. The OpenCV build is successful. However when building a catkin workspace with an executable that references this version of OpenCV the following error occurs:
.../path/to/my_file.so: undefined reference to `ippicviNorm_L1_32f_C3CMR'
.../path/to/my_file.so: undefined reference to `__itt_task_begin_ptr__3_0'
.../path/to/my_file.so: undefined reference to `ippicviAnd_8u_C1R'
.../path/to/my_file.so: undefined reference to `ippicviNorm_Inf_32f_C1MR'
.../path/to/my_file.so: undefined reference to `ippicviNormRel_L2_16u_C1R'
.../path/to/my_file.so: undefined reference to `ippicviNorm_L2_16u_C3CMR'
.../path/to/my_file.so: undefined reference to `ippicviNorm_Inf_32f_C3CMR'
.../path/to/my_file.so: undefined reference to `__itt_metadata_add_ptr__3_0'
.../path/to/my_file.so: undefined reference to `ippicviCompare_8u_C1R'
.../path/to/my_file.so: undefined reference to `ippicviNormRel_L2_16s_C1R'
.../path/to/my_file.so: undefined reference to `ippicvsMinEvery_16u'
.../path/to/my_file.so: undefined reference to `llwiCopyChannel'
.../path/to/my_file.so: undefined reference to `ippicviNormDiff_Inf_16u_C3CMR'
.../path/to/my_file.so: undefined reference to `ippicviNormRel_L2_32f_C1MR'
.../path/to/my_file.so: undefined reference to `ippicviMul_16u_C1RSfs'
I am running a AMD processor and built with IPP and ITT support off (tried with on as well). Here are my cmake arguments:
cmake -D CMAKE_INSTALL_PREFIX=/home/user/libs/opencv-4.5.2/release/installed \
-D CMAKE_BUILD_TYPE=RELEASE \
-D WITH_TBB=ON \
-D ENABLE_FAST_MATH=1 \
-D CUDA_FAST_MATH=1 \
-D WITH_CUBLAS=1 \
-D WITH_CUDA=ON \
-D BUILD_opencv_cudacodec=OFF \
-D WITH_CUDNN=ON \
-D OPENCV_DNN_CUDA=ON \
-D CUDA_ARCH_BIN=7.5 \
-D WITH_V4L=ON \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
-D WITH_GSTREAMER=ON \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D OPENCV_PC_FILE_NAME=opencv.pc \
-D OPENCV_ENABLE_NONFREE=ON \
-D OPENCV_PYTHON3_INSTALL_PATH=~/.virtualenvs/cv/lib/python3.8/site-packages \
-D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \
-D OPENCV_EXTRA_MODULES_PATH=/home/user/projects/opencv_contrib-4.5.2/modules \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D INSTALL_C_EXAMPLES=OFF \
-D BUILD_EXAMPLES=OFF \
-D CUDNN_INCLUDE_DIR=/usr/local/cuda-11.1/targets/x86_64-linux/include/ \
-D CUDNN_LIBRARY=/usr/lib/x86_64-linux-gnu/libcudnn.so \
-D CUDNN_VERSION=8.4.1 \
-D WITH_ITT=OFF \
-D WITH_IPP=OFF \
..
Why is it attempting to link against IPP still? Is there a patch fix somewhere to prevent this from happening?