opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

CUDA_cufft_LIBRARY (ADVANCED) CMakeError

Open Eyshika opened this issue 1 year ago • 2 comments

System information (version)
  • OpenCV => :grey_question: 4.7
  • Operating System / Platform => :grey_question: Ubuntu18
  • Compiler => :grey_question: cmake
Detailed description

I am installing opencv from source, to be able to use NVIDIA optical flow functions. But its giving below error while generating cmake.

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cufft_LIBRARY (ADVANCED)
    linked by target "opencv_cudev" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudev
    linked by target "opencv_test_cudev" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudev/test
    linked by target "opencv_core" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/core
    linked by target "opencv_test_core" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/core
    linked by target "opencv_perf_core" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/core
    linked by target "opencv_cudaarithm" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudaarithm
    linked by target "opencv_cudaarithm" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudaarithm
    linked by target "opencv_perf_cudaarithm" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudaarithm
    linked by target "opencv_test_cudaarithm" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/cudaarithm
    linked by target "opencv_test_flann" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/flann
    linked by target "opencv_flann" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/flann
    linked by target "opencv_perf_imgproc" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/imgproc
    linked by target "opencv_test_imgproc" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/imgproc
    linked by target "opencv_imgproc" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/imgproc
    linked by target "opencv_test_intensity_transform" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/intensity_transform
    linked by target "opencv_intensity_transform" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/intensity_transform
    linked by target "opencv_test_ml" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/ml
    linked by target "opencv_ml" in directory /home/eyshika.agarwal/opencv-4.8.0/modules/ml
    linked by target "opencv_test_phase_unwrapping" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/phase_unwrapping
    linked by target "opencv_phase_unwrapping" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/phase_unwrapping
    linked by target "opencv_plot" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/plot
    linked by target "opencv_test_quality" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/quality
    linked by target "opencv_quality" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/quality
    linked by target "opencv_perf_reg" in directory /home/eyshika.agarwal/opencv_contrib-4.8.0/modules/reg

I dont understand , why its doing this, I am using cmake -D WITH_CUDA=ON -D CMAKE_BUILD_TYPE=RELEASE -D WITH_TBB=ON -D BUILD_opencv_cudacodec=OFF -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WOTH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=OFF -D OPENCV_GENERATE_PKGCONFIG=ON -D OPENCV_ENABLE_NONFREE=ON -D BUILD_opencv_python2=OFF -D CMAKE_INSTALL_PREFIX=/usr/local -D PYTHON3_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") -D PYTHON3_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") -D PYTHON3_EXECUTABLE=$(which python3) -D PYTHON_DEFAULT_EXECUTABLE=$(which python3) -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-4.8.0/modules -D WITH_JASPER=OFF -D BUILD_EXAMPLES=OFF -D WITH_IPP=ON -D BUILD_SHARED_LIBS=OFF -D HAVE_opencv_python3=ON -D CUDA_ARCH_BIN=6.0 -D CUDA_ARCH_PTX="" ..

Steps to reproduce
Issue submission checklist
  • [x] I report the issue, it's not a question
  • [x] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • [x] I updated to the latest OpenCV version and the issue is still there
  • [ ] There is reproducer code and related data files: videos, images, onnx, etc

Eyshika avatar Oct 10 '23 20:10 Eyshika

I suspect there is something wrong with your CUDA installation. How and where is it installed? Can you post the full output from the CMake configuration stage.

If you have followed instructions from a third party guide on how to install everything I would ask them for help as they are more likely to know what issue their guide may have caused.

cudawarped avatar Oct 11 '23 05:10 cudawarped

CuFFT need to be installed (with -dev package, if you use apt) to build OpenCV. It's required dependency.

asmorkalov avatar Oct 25 '23 14:10 asmorkalov