Error Compile Opencv 4.8.0 with Cuda in ubuntu 24.04

Hello
I’m trying to compile OPENCV 4.8.0 with CUDA, but I get an error that I don’t know how to solve.

I am using Ubuntu 24.04

This is the error

/home/benjamin/dist/opencv-4.8.0/modules/core/include/opencv2/core/utility.hpp: In member function ‘void cv::Mat::forEach_impl(const Functor&)::PixelOperationWrapper::operator()(const cv::Range&) const [with _Tp = cv::Vec<int, 5>; Functor = opencv_test::{anonymous}::InitializerFunctor5D<cv::Vec<int, 5> >]’:
/home/benjamin/dist/opencv-4.8.0/modules/core/include/opencv2/core/utility.hpp:692:15: note: at offset 16 into object ‘idx’ of size 8
  692 |             } idx = {{row, 0}};
      |               ^~~
/home/benjamin/dist/opencv_contrib-4.8.0/modules/xfeatures2d/src/cuda/surf.cu:733:30: warning: no previous declaration for ‘void cv::cuda::device::surf::calc_dx_dy(cv::cudev::TexturePtr<unsigned char>, const float*, const float*, const float*, const float*, float&, float&)’ [-Wmissing-declarations]
  733 |         __device__ void calc_dx_dy(cudev::TexturePtr<uchar> tex, const float* featureX, const float* featureY, const float* featureSize, const float* featureDir,
      |                              ^~~~~~~~~~
/home/benjamin/dist/opencv_contrib-4.8.0/modules/xfeatures2d/src/cuda/surf.cu: In function ‘void cv::cuda::device::surf::icvFindMaximaInLayer_gpu(const cv::cuda::PtrStepSz<unsigned int>&, const cv::cuda::PtrStepf&, const cv::cuda::PtrStepf&, int4*, unsigned int*, int, int, int, bool, int)’:
/home/benjamin/dist/opencv_contrib-4.8.0/modules/xfeatures2d/src/cuda/surf.cu:379:15: warning: ‘mask.cv::cuda::device::surf::Mask<false>::tex.cv::cudev::TexturePtr<unsigned int>::tex’ may be used uninitialized [-Wmaybe-uninitialized]
  379 |                 Mask<false> mask;
      |               ^ ~~
/usr/bin/ld: CMakeFiles/opencv_dnn.dir/src/layers/recurrent_layers.cpp.o: in function `cv::dnn::cuda4dnn::csl::LSTM<__half>::LSTM(cv::dnn::cuda4dnn::csl::cudnn::Handle, cv::dnn::cuda4dnn::csl::LSTM<__half>::params_type const&)':
recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn3csl4LSTMI6__halfEC2ENS2_5cudnn6HandleERKNS5_11params_typeE[_ZN2cv3dnn8cuda4dnn3csl4LSTMI6__halfEC5ENS2_5cudnn6HandleERKNS5_11params_typeE]+0x400): undefined reference to `cudnnSetRNNDescriptor_v6'
/usr/bin/ld: recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn3csl4LSTMI6__halfEC2ENS2_5cudnn6HandleERKNS5_11params_typeE[_ZN2cv3dnn8cuda4dnn3csl4LSTMI6__halfEC5ENS2_5cudnn6HandleERKNS5_11params_typeE]+0x620): undefined reference to `cudnnGetRNNWorkspaceSize'
/usr/bin/ld: CMakeFiles/opencv_dnn.dir/src/layers/recurrent_layers.cpp.o: in function `cv::dnn::cuda4dnn::csl::LSTM<float>::LSTM(cv::dnn::cuda4dnn::csl::cudnn::Handle, cv::dnn::cuda4dnn::csl::LSTM<float>::params_type const&)':
recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn3csl4LSTMIfEC2ENS2_5cudnn6HandleERKNS4_11params_typeE[_ZN2cv3dnn8cuda4dnn3csl4LSTMIfEC5ENS2_5cudnn6HandleERKNS4_11params_typeE]+0x3fd): undefined reference to `cudnnSetRNNDescriptor_v6'
/usr/bin/ld: recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn3csl4LSTMIfEC2ENS2_5cudnn6HandleERKNS4_11params_typeE[_ZN2cv3dnn8cuda4dnn3csl4LSTMIfEC5ENS2_5cudnn6HandleERKNS4_11params_typeE]+0x620): undefined reference to `cudnnGetRNNWorkspaceSize'
/usr/bin/ld: CMakeFiles/opencv_dnn.dir/src/layers/recurrent_layers.cpp.o: in function `cv::dnn::cuda4dnn::LSTMOp<float>::forward(std::vector<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper>, std::allocator<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper> > > const&, std::vector<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper>, std::allocator<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper> > > const&, cv::dnn::cuda4dnn::csl::Workspace&)':
recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn6LSTMOpIfE7forwardERKSt6vectorINS_3PtrINS0_14dnn4_v2023062014BackendWrapperEEESaIS8_EESC_RNS1_3csl9WorkspaceE[_ZN2cv3dnn8cuda4dnn6LSTMOpIfE7forwardERKSt6vectorINS_3PtrINS0_14dnn4_v2023062014BackendWrapperEEESaIS8_EESC_RNS1_3csl9WorkspaceE]+0x83c): undefined reference to `cudnnRNNForwardInference'
/usr/bin/ld: CMakeFiles/opencv_dnn.dir/src/layers/recurrent_layers.cpp.o: in function `cv::dnn::cuda4dnn::LSTMOp<__half>::forward(std::vector<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper>, std::allocator<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper> > > const&, std::vector<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper>, std::allocator<cv::Ptr<cv::dnn::dnn4_v20230620::BackendWrapper> > > const&, cv::dnn::cuda4dnn::csl::Workspace&)':
recurrent_layers.cpp:(.text._ZN2cv3dnn8cuda4dnn6LSTMOpI6__halfE7forwardERKSt6vectorINS_3PtrINS0_14dnn4_v2023062014BackendWrapperEEESaIS9_EESD_RNS1_3csl9WorkspaceE[_ZN2cv3dnn8cuda4dnn6LSTMOpI6__halfE7forwardERKSt6vectorINS_3PtrINS0_14dnn4_v2023062014BackendWrapperEEESaIS9_EESD_RNS1_3csl9WorkspaceE]+0x818): undefined reference to `cudnnRNNForwardInference'
collect2: error: ld returned 1 exit status
make[2]: *** [modules/dnn/CMakeFiles/opencv_dnn.dir/build.make:2725: lib/libopencv_dnn.so.4.8.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:5516: modules/dnn/CMakeFiles/opencv_dnn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:166: all] Error 2

This is my installation script

OPENCV_VERSION=4.8.0

BUILD_FLAGS="
	-D BUILD_IPP_IW=ON
	-D BUILD_ITT=ON
	-D BUILD_PROTOBUF=ON
	-D BUILD_SHARED_LIBS=ON
	-D CMAKE_BUILD_TYPE=Release
	-D CMAKE_INSTALL_PREFIX=/usr
	-D CV_ENABLE_INTRINSICS=ON
	-D ENABLE_PIC=ON
	-D OPENCV_ENABLE_NONFREE=ON
	-D OPENCV_FORCE_3RDPARTY_BUILD=ON
	-D OPENCV_GENERATE_PKGCONFIG=ON
	-D WITH_1394=ON
	-D WITH_ADE=ON
	-D WITH_EIGEN=ON
	-D WITH_FFMPEG=ON
	-D WITH_GDAL=ON
	-D WITH_GPHOTO2=ON
	-D WITH_GSTREAMER=ON
	-D WITH_IMGCODEC_HDcR=ON
	-D WITH_IMGCODEC_PXM=ON
	-D WITH_IMGCODEC_SUNRASTER=ON
	-D WITH_IPP=ON
	-D WITH_ITT=ON
	-D WITH_JPEG=ON
	-D WITH_LAPACK=ON
	-D WITH_OPENGL=ON
	-D WITH_PNG=ON
	-D WITH_PROTOBUF=ON
	-D WITH_PTHREADS_PF=ON
	-D WITH_QT=ON
	-D WITH_QUIRC=ON
	-D WITH_TBB=ON
	-D WITH_V4L=ON
	-D WITH_VA=ON
	-D WITH_VA_INTEL=ON
	-D WITH_VTK=ON
	-D WITH_WEBP=ON
"
#CUDA
BUILD_FLAGS="$BUILD_FLAGS
	-D BUILD_CUDA_STUBS=ON
	-D WITH_CUDA=ON 
	-D WITH_CUDNN=ON 
	-D OPENCV_DNN_CUDA=ON 
	-D CUDA_ARCH_BIN=6.1
	-D ENABLE_FAST_MATH=ON 
	-D CUDA_FAST_MATH=ON 
	-D WITH_CUFFT=ON 
	-D WITH_CUBLAS=ON 
	-D WITH_OPENCL=ON 
"

sudo apt-get -y install build-essential cmake


dist_dir="$HOME/dist/"
base_dir="$HOME/build/opencv/"
build_dir="$base_dir/opencv-$OPENCV_VERSION-build/"
mkdir -p "$dist_dir" "$base_dir" "$build_dir"

opencv_src="$dist_dir/opencv-$OPENCV_VERSION"
if [ ! -d "$opencv_src" ]; then
	curl -L "https://github.com/opencv/opencv/archive/$OPENCV_VERSION.tar.gz" | tar -xz -C "$dist_dir"
fi

opencv_contrib_src="$dist_dir/opencv_contrib-$OPENCV_VERSION"
if [ ! -d "$opencv_contrib_src" ]; then
	curl -L "https://github.com/opencv/opencv_contrib/archive/$OPENCV_VERSION.tar.gz" | tar -xz -C "$dist_dir"
fi

pushd "$build_dir" > /dev/null
cmake $BUILD_FLAGS \
	-D CMAKE_INSTALL_PREFIX=/usr \
	-D OPENCV_EXTRA_MODULES_PATH="$opencv_contrib_src/modules" \
	-D CMAKE_C_COMPILER=gcc-12 \
	-D CMAKE_CXX_COMPILER=g++-12 \
	"$opencv_src"
make -j"$(nproc)"
sudo make -j"$(nproc)" install
popd > /dev/null

Apparently it finds all the libraries.

  libcudnn9-samples
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
-- The CXX compiler identification is GNU 12.3.0
-- TBB: Downloading v2020.2.tar.gz from https://github.com/01org/tbb/archive/v2020.2.tar.gz
-- IPPICV: Downloading ippicv_2021.8_lnx_intel64_20230330_general.tgz from https://raw.githubusercontent.com/opencv/opencv_3rdparty/1224f78da6684df04397ac0f40c961ed37f79ccb/ippicv/ippicv_2021.8_lnx_intel64_20230330_general.tgz
-- found Intel IPP (ICV version): 2021.8.0 [2021.8]
-- at: /home/benjamin/build/opencv/opencv-4.8.0-build/3rdparty/ippicv/ippicv_lnx/icv
-- found Intel IPP Integration Wrappers sources: 2021.8.0
-- at: /home/benjamin/build/opencv/opencv-4.8.0-build/3rdparty/ippicv/ippicv_lnx/iw
-- Found Threads: TRUE  
-- Found CUDNN: /usr/lib/x86_64-linux-gnu/libcudnn.so (found suitable version "9.1.1", minimum required is "7.5") 
-- CUDA detected: 12.0
-- CUDA: Using CUDA_ARCH_BIN=6.1
-- CUDA NVCC target flags: -gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
-- Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
-- Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
-- Could NOT find Atlas (missing: Atlas_CLAPACK_INCLUDE_DIR) 
-- Looking for sgemm_
-- Looking for sgemm_ - not found
-- Looking for sgemm_
-- Looking for sgemm_ - found
-- Found BLAS: /usr/lib/x86_64-linux-gnu/libopenblas.so  
-- Looking for cheev_
-- Looking for cheev_ - found
-- Found LAPACK: /usr/lib/x86_64-linux-gnu/libopenblas.so;-lm;-ldl  
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS
-- Performing Test HAVE_CXX_WNO_UNUSED_LOCAL_TYPEDEFS - Success
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Success
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
-- Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS
-- Performing Test HAVE_CXX_WNO_IGNORED_QUALIFIERS - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION
-- Performing Test HAVE_CXX_WNO_UNUSED_FUNCTION - Success
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_CONST_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
-- Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF
-- Performing Test HAVE_CXX_WNO_INVALID_OFFSETOF - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Failed
-- Found Java: /usr/bin/java (found version "22.0.1") 
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT) 
-- VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
-- Looking for dlerror in dl
-- Looking for dlerror in dl - found
-- ADE: Downloading v0.1.2a.zip from https://github.com/opencv/ade/archive/v0.1.2a.zip
-- Checking for module 'gtk+-3.0'
--   Package 'gtk+-3.0', required by 'virtual:world', not found
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.33
-- Checking for module 'gthread-2.0>=2.32'
--   Found gthread-2.0, version 2.80.0
-- Checking for module 'gtkglext-1.0'
--   Found gtkglext-1.0, version 1.2.0
-- Performing Test HAVE_CXX_WNO_STRICT_ALIASING
-- Performing Test HAVE_CXX_WNO_STRICT_ALIASING - Success
-- Checking for modules 'libavcodec;libavformat;libavutil;libswscale'
--   Found libavcodec, version 60.31.102
--   Found libavformat, version 60.16.100
--   Found libavutil, version 58.29.100
--   Found libswscale, version 7.5.100
-- Checking for module 'libavresample'
--   Package 'libavresample', required by 'virtual:world', not found
-- Checking for module 'gstreamer-base-1.0'
--   Found gstreamer-base-1.0, version 1.24.2
-- Checking for module 'gstreamer-app-1.0'
--   Found gstreamer-app-1.0, version 1.24.2
-- Checking for module 'gstreamer-riff-1.0'
--   Found gstreamer-riff-1.0, version 1.24.2
-- Checking for module 'gstreamer-pbutils-1.0'
--   Found gstreamer-pbutils-1.0, version 1.24.2
-- Checking for module 'gstreamer-video-1.0'
--   Found gstreamer-video-1.0, version 1.24.2
-- Checking for module 'gstreamer-audio-1.0'
--   Found gstreamer-audio-1.0, version 1.24.2
-- Checking for module 'libdc1394-2'
--   Found libdc1394-2, version 2.2.6
-- Checking for module 'libgphoto2'
--   Found libgphoto2, version 2.5.31
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_VARIABLE - Success
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE
-- Performing Test HAVE_CXX_WNO_ENUM_COMPARE - Success
-- Checking for module 'freetype2'
--   Found freetype2, version 26.1.20
-- Checking for module 'harfbuzz'
--   Found harfbuzz, version 8.3.0
-- freetype2:   YES (ver 26.1.20)
-- harfbuzz:    YES (ver 8.3.0)
-- Could NOT find HDF5 (missing: HDF5_LIBRARIES HDF5_INCLUDE_DIRS) (found version "")
-- Julia not found. Not compiling Julia Bindings. 
-- Module opencv_ovis disabled because OGRE3D was not found
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
-- Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
-- Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
-- Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
-- Checking for module 'tesseract'
--   Found tesseract, version 5.3.4
-- Tesseract:   YES (ver 5.3.4)
-- Allocator metrics storage type: 'long long'
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE
-- Performing Test HAVE_CXX_WNO_UNUSED_BUT_SET_VARIABLE - Success
-- Excluding from source files list: modules/imgproc/src/imgwarp.lasx.cpp
-- Excluding from source files list: modules/imgproc/src/resize.lasx.cpp
-- Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': /home/benjamin/dist/opencv-4.8.0/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/int8layers/layers_common.lasx.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp
-- Excluding from source files list: <BUILD>/modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp
-- imgcodecs: OpenEXR codec is disabled in runtime. Details: https://github.com/opencv/opencv/issues/21326
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL
-- Performing Test HAVE_CXX_WNO_OVERLOADED_VIRTUAL - Success
-- highgui: using builtin backend: GTK2
-- Performing Test Iconv_IS_BUILT_IN
-- Performing Test Iconv_IS_BUILT_IN - Success
-- wechat_qrcode: Downloading detect.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.caffemodel
-- wechat_qrcode: Downloading detect.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/detect.prototxt
-- wechat_qrcode: Downloading sr.caffemodel from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.caffemodel
-- wechat_qrcode: Downloading sr.prototxt from https://raw.githubusercontent.com/WeChatCV/opencv_3rdparty/a8b69ccc738421293254aec5ddb38bd523503252/sr.prototxt
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_bi.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i
-- xfeatures2d/boostdesc: Downloading boostdesc_bgm_hd.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_064.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_128.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i
-- xfeatures2d/boostdesc: Downloading boostdesc_binboost_256.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i
-- xfeatures2d/boostdesc: Downloading boostdesc_lbgm.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i
-- xfeatures2d/vgg: Downloading vgg_generated_48.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i
-- xfeatures2d/vgg: Downloading vgg_generated_64.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i
-- xfeatures2d/vgg: Downloading vgg_generated_80.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i
-- xfeatures2d/vgg: Downloading vgg_generated_120.i from https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i
-- data: Downloading face_landmark_model.dat from https://raw.githubusercontent.com/opencv/opencv_3rdparty/8afa57abc8229d611c4937165d20e2a2d9fc5a12/face_landmark_model.dat
-- NVIDIA_OPTICAL_FLOW: Downloading edb50da3cf849840d680249aa6dbef248ebce2ca.zip from https://github.com/NVIDIA/NVIDIAOpticalFlowSDK/archive/edb50da3cf849840d680249aa6dbef248ebce2ca.zip
-- Building with NVIDIA Optical Flow API 2.0
-- Found 'misc' Python modules from /home/benjamin/dist/opencv-4.8.0/modules/python/package/extra_modules
-- Found 'mat_wrapper;utils' Python modules from /home/benjamin/dist/opencv-4.8.0/modules/core/misc/python/package
-- Found 'gapi' Python modules from /home/benjamin/dist/opencv-4.8.0/modules/gapi/misc/python/package
-- 
-- General configuration for OpenCV 4.8.0 =====================================
--   Version control:               unknown
-- 
--   Extra modules:
--     Location (extra):            /home/benjamin/dist/opencv_contrib-4.8.0/modules
--     Version control (extra):     unknown
-- 
--   Platform:
--     Timestamp:                   2024-05-09T15:49:58Z
--     Host:                        Linux 6.8.0-31-generic x86_64
--     CMake:                       3.28.3
--     CMake generator:             Unix Makefiles
--     CMake build tool:            /usr/bin/gmake
--     Configuration:               Release
-- 
--   CPU/HW features:
--     Baseline:                    SSE SSE2 SSE3
--       requested:                 SSE3
--     Dispatched code generation:  SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
--       requested:                 SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
--       SSE4_1 (18 files):         + SSSE3 SSE4_1
--       SSE4_2 (2 files):          + SSSE3 SSE4_1 POPCNT SSE4_2
--       FP16 (1 files):            + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
--       AVX (8 files):             + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
--       AVX2 (37 files):           + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
--       AVX512_SKX (8 files):      + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX
-- 
--   C/C++:
--     Built as dynamic libs?:      YES
--     C++ standard:                11
--     C++ Compiler:                /usr/bin/g++-12  (ver 12.3.0)
--     C++ flags (Release):         -fsigned-char -ffast-math -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG  -DNDEBUG
--     C++ flags (Debug):           -fsigned-char -ffast-math -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g  -O0 -DDEBUG -D_DEBUG
--     C Compiler:                  /usr/bin/gcc-12
--     C flags (Release):           -fsigned-char -ffast-math -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -O3 -DNDEBUG  -DNDEBUG
--     C flags (Debug):             -fsigned-char -ffast-math -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2 -msse3 -fvisibility=hidden -g  -O0 -DDEBUG -D_DEBUG
--     Linker flags (Release):      -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
--     Linker flags (Debug):        -Wl,--exclude-libs,libippicv.a -Wl,--exclude-libs,libippiw.a   -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined  
--     ccache:                      NO
--     Precompiled headers:         NO
--     Extra dependencies:          m pthread cudart_static dl rt nppc nppial nppicc nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cudnn cufft -L/usr/lib/x86_64-linux-gnu
--     3rdparty dependencies:
-- 
--   OpenCV modules:
--     To be built:                 alphamat aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann freetype fuzzy gapi hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor mcc ml objdetect optflow phase_unwrapping photo plot quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
--     Disabled:                    world
--     Disabled by dependency:      -
--     Unavailable:                 cvv hdf java julia matlab ovis python2 python3 sfm viz
--     Applications:                tests perf_tests apps
--     Documentation:               NO
--     Non-free algorithms:         YES
-- 
--   GUI:                           GTK2
--     QT:                          NO
--     GTK+:                        YES (ver 2.24.33)
--       GThread :                  YES (ver 2.80.0)
--       GtkGlExt:                  YES (ver 1.2.0)
--     OpenGL support:              YES (/usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so)
--     VTK support:                 NO
-- 
--   Media I/O: 
--     ZLib:                        build (ver 1.2.13)
--     JPEG:                        build-libjpeg-turbo (ver 2.1.3-62)
--       SIMD Support Request:      YES
--       SIMD Support:              NO
--     WEBP:                        build (ver encoder: 0x020f)
--     PNG:                         build (ver 1.6.37)
--     TIFF:                        build (ver 42 - 4.2.0)
--     JPEG 2000:                   build (ver 2.5.0)
--     OpenEXR:                     build (ver 2.3.0)
--     GDAL:                        NO
--     HDR:                         YES
--     SUNRASTER:                   YES
--     PXM:                         YES
--     PFM:                         YES
-- 
--   Video I/O:
--     DC1394:                      YES (2.2.6)
--     FFMPEG:                      YES
--       avcodec:                   YES (60.31.102)
--       avformat:                  YES (60.16.100)
--       avutil:                    YES (58.29.100)
--       swscale:                   YES (7.5.100)
--       avresample:                NO
--     GStreamer:                   YES (1.24.2)
--     v4l/v4l2:                    YES (linux/videodev2.h)
--     gPhoto2:                     YES
-- 
--   Parallel framework:            TBB (ver 2020.2 interface 11102)
-- 
--   Trace:                         YES (with Intel ITT)
-- 
--   Other third-party libraries:
--     Intel IPP:                   2021.8 [2021.8.0]
--            at:                   /home/benjamin/build/opencv/opencv-4.8.0-build/3rdparty/ippicv/ippicv_lnx/icv
--     Intel IPP IW:                sources (2021.8.0)
--               at:                /home/benjamin/build/opencv/opencv-4.8.0-build/3rdparty/ippicv/ippicv_lnx/iw
--     VA:                          NO
--     Lapack:                      NO
--     Eigen:                       YES (ver 3.4.0)
--     Custom HAL:                  NO
--     Protobuf:                    build (3.19.1)
--     Flatbuffers:                 builtin/3rdparty (23.5.9)
-- 
--   NVIDIA CUDA:                   YES (ver 12.0, CUFFT CUBLAS FAST_MATH)
--     NVIDIA GPU arch:             61
--     NVIDIA PTX archs:
-- 
--   cuDNN:                         YES (ver 9.1.1)
-- 
--   OpenCL:                        YES (no extra features)
--     Include path:                /home/benjamin/dist/opencv-4.8.0/3rdparty/include/opencl/1.2
--     Link libraries:              Dynamic load
-- 
--   Python (for build):            /usr/bin/python3
-- 
--   Java:                          
--     ant:                         NO
--     Java:                        YES (ver 22.0.1)
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO
-- 
--   Install to:                    /usr
-- -----------------------------------------------------------------
-- 

I would appreciate any help