# OpenCV 4.2 with geforce 3050Ti

**URL:** <https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168>\
**Category:** C++\
**Tags:** build, cuda\
**Created:** [August 7, 2023, 10:48pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168 "2023-08-07T22:48:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 7, 2023, 10:48pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/1 "2023-08-07T22:48:27Z")

</div>

Hi,

i am quite new at this and battling to install OpenCV 4.2 in my laptop.  
I have a lenovo P5 AMD Ryzen 5 with geforce 3050Ti (Ampere 8.6)

As far as I understand I have to use cuda 11+ with this card. Also I installes nvidia 470 as driver (535 was not working from scratch)  
I tryed to install opencv 4.2 with cuda 11.4 but couldnt make it, I think I had issues with gcc 8/9 and with the arch\_bin compatibility

any clues??

thanks

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [August 8, 2023, 4:46am UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/2 "2023-08-08T04:46:34Z")

</div>

> [@federico\_bliman](#):
>
> As far as I understand I have to use cuda 11+ with this card. Also I installes nvidia 470 as driver (535 was not working from scratch)  
> I tryed to install opencv 4.2 with cuda 11.4 but couldnt make it, I think I had issues with gcc 8/9 and with the arch\_bin compatibility

You need to use CUDA \>= 11.1 to support that card.

> [@federico\_bliman](#):
>
> any clues??

No our powers of deduction are not that great, can you provide the CMake input and configuration output please?

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 12:39pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/3 "2023-08-08T12:39:07Z")

</div>

Thanks!  
so, i have cuda 11.4 and the cmake I use is

> cmake -D CMAKE\_BUILD\_TYPE=RELEASE   
> -D CMAKE\_C\_COMPILER=/usr/bin/gcc-8   
> -D CMAKE\_CXX\_COMPILER=/usr/bin/g++8   
> -D CMAKE\_CXX\_FLAGS=“-Wno-error=missing-prototypes”   
> -D CMAKE\_INSTALL\_PREFIX=/usr/local   
> -D INSTALL\_PYTHON\_EXAMPLES=ON   
> -D INSTALL\_C\_EXAMPLES=OFF   
> -D WITH\_TBB=ON   
> -D BUILD\_opencv\_cudacodec=OFF   
> -D ENABLE\_FAST\_MATH=1   
> -D CUDA\_FAST\_MATH=1   
> -D WITH\_CUDA=ON   
> -D WITH\_CUBLAS=1   
> -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 OPENCV\_EXTRA\_MODULES\_PATH=~/opencv\_contrib-4.2.0/modules   
> -D PYTHON\_EXECUTABLE=~/.virtualenvs/cv/bin/python   
> -D BUILD\_EXAMPLES=OFF   
> -D WITH\_CUDNN=ON   
> -D CUDA\_HOST\_COMPILER=/usr/bin/gcc-9   
> -D OPENCV\_DNN\_CUDA=ON   
> -D CUDA\_ARCH\_BIN=8.6   
> -D CUDNN\_LIBRARY=/usr/local/cuda-11.4/lib64/libcudnn.so.8.9.3   
> -D CUDNN\_INCLUDE\_DIR=/usr/local/cuda-11.4/include   
> -D WITH\_OPENCL=ON   
> -D OpenCL\_INCLUDE\_DIR=/usr/local/cuda-11.4/targets/x86\_64-linux/include   
> -D OpenCL\_LIBRARY=/usr/lib/x86\_64-linux-gnu/libOpenCL.so.1 …

I am getting this error now

Please set them or make sure they are set and tested correctly in the CMake files:  
CUDA\_nppicom\_LIBRARY (ADVANCED)

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [August 8, 2023, 12:57pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/4 "2023-08-08T12:57:07Z")

</div>

> [@federico\_bliman](#):
>
> I am getting this error now
> 
> Please set them or make sure they are set and tested correctly in the CMake files:  
> CUDA\_nppicom\_LIBRARY (ADVANCED)

Can you post the full CMake output?

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [August 8, 2023, 1:03pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/5 "2023-08-08T13:03:03Z")

</div>

I would very much recommend NOT building OpenCV v4.2. use the latest release.

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 1:17pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/6 "2023-08-08T13:17:30Z")

</div>

I need 4.2 for compatibility reasons with ROS noetic

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [August 8, 2023, 2:17pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/7 "2023-08-08T14:17:44Z")

</div>

If that’s the case and without the viewing your CMake output, I would add the [patch](https://github.com/opencv/opencv/blob/f9a59f2592993d3dcc080e495f4f5e02dd8ec7ef/cmake/OpenCVDetectCUDA.cmake#L37) for CUDA 11.0 to OpenCV 4.2.0 by adding

> if(NOT CUDA\_VERSION VERSION\_LESS 11.0)  
> # CUDA 11.0 removes nppicom  
> ocv\_list\_filterout(CUDA\_nppi\_LIBRARY “nppicom”)  
> ocv\_list\_filterout(CUDA\_npp\_LIBRARY “nppicom”)  
> endif()

[here](https://github.com/opencv/opencv/blob/bda89a6469aa79ecd8713967916bd754bff1d931/cmake/OpenCVDetectCUDA.cmake#L31C1-L31C1).

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 2:29pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/8 "2023-08-08T14:29:18Z")

</div>

I could manage to solve de missing libray problem, now dealing with not detecting CUDNN

> [@cudawarped](#):
>
> > [@federico\_bliman](#):
> >
> > I am getting this error now
> > 
> > Please set them or make sure they are set and tested correctly in the CMake files:  
> > CUDA\_nppicom\_LIBRARY (ADVANCED)
> 
> Can you post the full CMake output?

> [@cudawarped](#):
>
> > [@federico\_bliman](#):
> >
> > I am getting this error now
> > 
> > Please set them or make sure they are set and tested correctly in the CMake files:  
> > CUDA\_nppicom\_LIBRARY (ADVANCED)
> 
> Can you post the full CMake output?

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 2:31pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/9 "2023-08-08T14:31:08Z")

</div>

– Could NOT find CUDNN: Found unsuitable version “…”, but required is at least “7.5” (found /usr/local/cuda-11.4/lib64/libcudnn.so.8.9.3)

cudnn is installed, but for some reason it is not recognizgin it

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 2:32pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/10 "2023-08-08T14:32:05Z")

</div>

– Detected processor: x86\_64  
– Could NOT find PythonInterp (missing: PYTHON\_EXECUTABLE) (Required is at least version “2.7”)  
– Looking for ccache - not found  
– Found ZLIB: /usr/lib/x86\_64-linux-gnu/libz.so (found suitable version “1.2.11”, minimum required is “1.2.3”)  
– Could NOT find Jasper (missing: JASPER\_LIBRARIES JASPER\_INCLUDE\_DIR)  
– Found ZLIB: /usr/lib/x86\_64-linux-gnu/libz.so (found version “1.2.11”)  
– Found TBB (cmake): /usr/lib/x86\_64-linux-gnu/libtbb.so.2  
– found Intel IPP (ICV version): 2019.0.0 [2019.0.0 Gold]  
– at: /home/fede/opencv-4.2.0/build/3rdparty/ippicv/ippicv\_lnx/icv  
– found Intel IPP Integration Wrappers sources: 2019.0.0  
– at: /home/fede/opencv-4.2.0/build/3rdparty/ippicv/ippicv\_lnx/iw  
– Could NOT find CUDNN: Found unsuitable version “..”, but required is at least “7.5” (found /usr/local/cuda-11.4/lib64/libcudnn.so.8.9.3)  
– CUDA detected: 11.4  
– CUDA NVCC target flags: -gencode;arch=compute\_86,code=sm\_86;-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)  
– A library with LAPACK API found.  
– Could NOT find JNI (missing: JAVA\_AWT\_LIBRARY JAVA\_JVM\_LIBRARY JAVA\_INCLUDE\_PATH JAVA\_INCLUDE\_PATH2 JAVA\_AWT\_INCLUDE\_PATH)  
– The imported target “vtkParseOGLExt” references the file  
“/usr/bin/vtkParseOGLExt-7.1”  
but this file does not exist. Possible reasons include:

- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained  
“/usr/lib/cmake/vtk-7.1/VTKTargets.cmake”  
but not all the files it references.

– The imported target “vtkRenderingPythonTkWidgets” references the file  
“/usr/lib/x86\_64-linux-gnu/libvtkRenderingPythonTkWidgets.so”  
but this file does not exist. Possible reasons include:

- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained  
“/usr/lib/cmake/vtk-7.1/VTKTargets.cmake”  
but not all the files it references.

– The imported target “vtk” references the file  
“/usr/bin/vtk”  
but this file does not exist. Possible reasons include:

- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained  
“/usr/lib/cmake/vtk-7.1/VTKTargets.cmake”  
but not all the files it references.

– The imported target “pvtk” references the file  
“/usr/bin/pvtk”  
but this file does not exist. Possible reasons include:

- The file was deleted, renamed, or moved to another location.
- An install or uninstall procedure did not complete successfully.
- The installation package was faulty and contained  
“/usr/lib/cmake/vtk-7.1/VTKTargets.cmake”  
but not all the files it references.

– Found VTK 7.1.1 (/usr/lib/cmake/vtk-7.1/UseVTK.cmake)  
– OpenCV Python: during development append to PYTHONPATH: /home/fede/opencv-4.2.0/build/python\_loader  
– Caffe: NO  
– Protobuf: NO  
– Glog: YES  
– freetype2: YES (ver 23.1.17)  
– harfbuzz: YES (ver 2.6.4)  
– HDF5: Using hdf5 compiler wrapper to determine C configuration  
– 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.  
– Found installed version of gflags: /usr/lib/x86\_64-linux-gnu/cmake/gflags  
– Detected gflags version: 2.2.2  
– Found installed version of Eigen: /usr/lib/cmake/eigen3  
– Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3  
– Found required Ceres dependency: glog  
– Found installed version of gflags: /usr/lib/x86\_64-linux-gnu/cmake/gflags  
– Detected gflags version: 2.2.2  
– Found required Ceres dependency: gflags  
– Found Ceres version: 1.14.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, OpenMP, Multithreading]  
– Checking SFM deps… TRUE  
– Checking for module ‘tesseract’  
– No package ‘tesseract’ found  
– Tesseract: NO  
– HDF5: Using hdf5 compiler wrapper to determine C configuration  
– Registering hook ‘INIT\_MODULE\_SOURCES\_opencv\_dnn’: /home/fede/opencv-4.2.0/modules/dnn/cmake/hooks/INIT\_MODULE\_SOURCES\_opencv\_dnn.cmake  
– opencv\_dnn: filter out cuda4dnn source code  
– 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.  
– Found installed version of gflags: /usr/lib/x86\_64-linux-gnu/cmake/gflags  
– Detected gflags version: 2.2.2  
– Found installed version of Eigen: /usr/lib/cmake/eigen3  
– Found required Ceres dependency: Eigen version 3.3.7 in /usr/include/eigen3  
– Found required Ceres dependency: glog  
– Found installed version of gflags: /usr/lib/x86\_64-linux-gnu/cmake/gflags  
– Detected gflags version: 2.2.2  
– Found required Ceres dependency: gflags  
– Found Ceres version: 1.14.0 installed in: /usr with components: [EigenSparse, SparseLinearAlgebraLibrary, LAPACK, SuiteSparse, CXSparse, SchurSpecializations, OpenMP, Multithreading]  
– Checking SFM deps… TRUE  
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):  
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install  
directory  
Call Stack (most recent call first):  
CMakeLists.txt:947 (include)

## – – General configuration for OpenCV 4.2.0 ===================================== – Version control: unknown

## – Extra modules: – Location (extra): /home/fede/opencv\_contrib-4.2.0/modules – Version control (extra): unknown

## – Platform: – Timestamp: 2023-08-08T13:06:43Z – Host: Linux 5.15.0-67-generic x86\_64 – CMake: 3.16.3 – CMake generator: Unix Makefiles – CMake build tool: /usr/bin/make – 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 (16 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 (5 files): + SSSE3 SSE4\_1 POPCNT SSE4\_2 AVX – AVX2 (29 files): + SSSE3 SSE4\_1 POPCNT SSE4\_2 FP16 FMA3 AVX AVX2 – AVX512\_SKX (6 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++ Compiler: /usr/bin/g+±8 (ver 8.4.0) – C++ flags (Release): -Wno-error=missing-prototypes -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -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): -Wno-error=missing-prototypes -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winit-self -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-8 – C flags (Release): -fsigned-char -ffast-math -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -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 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Winit-self -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,–gc-sections – Linker flags (Debug): -Wl,–gc-sections – ccache: NO – Precompiled headers: NO – Extra dependencies: m pthread cudart\_static -lpthread dl rt nppc nppial nppicc nppidei nppif nppig nppim nppist nppisu nppitc npps cublas cufft -L/usr/local/cuda-11.4/lib64 -L/usr/lib/x86\_64-linux-gnu – 3rdparty dependencies:

## – OpenCV modules: – To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn\_objdetect dnn\_superres dpm face features2d flann freetype fuzzy gapi hdf hfs highgui img\_hash imgcodecs imgproc line\_descriptor ml objdetect optflow phase\_unwrapping photo plot python3 quality reg rgbd saliency sfm shape stereo stitching structured\_light superres surface\_matching text tracking ts video videoio videostab viz xfeatures2d ximgproc xobjdetect xphoto – Disabled: cudacodec world – Disabled by dependency: - – Unavailable: cnn\_3dobj cvv java js matlab ovis python2 – Applications: tests perf\_tests apps – Documentation: NO – Non-free algorithms: YES

## – GUI: – GTK+: YES (ver 3.24.20) – GThread : YES (ver 2.64.6) – GtkGlExt: NO – OpenGL support: NO – VTK support: YES (ver 7.1.1)

## – Media I/O: – ZLib: /usr/lib/x86\_64-linux-gnu/libz.so (ver 1.2.11) – JPEG: /usr/lib/x86\_64-linux-gnu/libjpeg.so (ver 80) – WEBP: /usr/lib/x86\_64-linux-gnu/libwebp.so (ver encoder: 0x020e) – PNG: /usr/lib/x86\_64-linux-gnu/libpng.so (ver 1.6.37) – TIFF: /usr/lib/x86\_64-linux-gnu/libtiff.so (ver 42 / 4.1.0) – JPEG 2000: build (ver 1.900.1) – OpenEXR: build (ver 2.3.0) – HDR: YES – SUNRASTER: YES – PXM: YES – PFM: YES

## – Video I/O: – DC1394: YES (2.2.5) – FFMPEG: YES – avcodec: YES (58.54.100) – avformat: YES (58.29.100) – avutil: YES (56.31.100) – swscale: YES (5.5.100) – avresample: YES (4.0.0) – GStreamer: YES (1.16.3) – v4l/v4l2: YES (linux/videodev2.h)

## – Parallel framework: TBB (ver 2020.1 interface 11101)

## – Trace: YES (with Intel ITT)

## – Other third-party libraries: – Intel IPP: 2019.0.0 Gold [2019.0.0] – at: /home/fede/opencv-4.2.0/build/3rdparty/ippicv/ippicv\_lnx/icv – Intel IPP IW: sources (2019.0.0) – at: /home/fede/opencv-4.2.0/build/3rdparty/ippicv/ippicv\_lnx/iw – Lapack: NO – Eigen: YES (ver 3.3.7) – Custom HAL: NO – Protobuf: build (3.5.1)

## – NVIDIA CUDA: YES (ver 11.4, CUFFT CUBLAS FAST\_MATH) – NVIDIA GPU arch: 86 – NVIDIA PTX archs:

## – cuDNN: NO

## – OpenCL: YES (no extra features) – Include path: /home/fede/opencv-4.2.0/3rdparty/include/opencl/1.2 – Link libraries: Dynamic load

## – Python 3: – Interpreter: /home/fede/.virtualenvs/cv/bin/python3 (ver 3.8.10) – Libraries: /usr/lib/x86\_64-linux-gnu/libpython3.8.so (ver 3.8.10) – numpy: /home/fede/.virtualenvs/cv/lib/python3.8/site-packages/numpy/core/include (ver 1.24.4) – install path: /home/fede/.virtualenvs/cv/lib/python3.8/site-packages/cv2/python-3.8

## – Python (for build): /home/fede/.virtualenvs/cv/bin/python3

## – Java: – ant: NO – JNI: NO – Java wrappers: NO – Java tests: NO

– Install to: /usr/local

* * *

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [August 8, 2023, 2:52pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/11 "2023-08-08T14:52:54Z")

</div>

To be on the safe side as your using a version of OpenCV which is nearly 4 years old I would install the recommended version cuDNN (7.5).

---

<div class="post-metadata">

**Author:** ![federico\_bliman](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/federico_bliman/32/8477_2.png) [@federico\_bliman](https://forum.opencv.org/u/federico_bliman)\
**Post date:** [August 8, 2023, 3:00pm UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/12 "2023-08-08T15:00:47Z")

</div>

wont t I have any compat problems cuda 11.4 with cudNN 7.5?

---

<div class="post-metadata">

**Author:** ![cudawarped](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@cudawarped](https://forum.opencv.org/u/cudawarped)\
**Post date:** [August 9, 2023, 4:50am UTC](https://forum.opencv.org/t/opencv-4-2-with-geforce-3050ti/14168/13 "2023-08-09T04:50:33Z")

</div>

Ignore my previous comment, I think you need to add these lines

> <https://github.com/cyyever/opencv/blob/733319973e695c8e0071a15d243ed7a1e4cfba4c/cmake/FindCUDNN.cmake#L68>

because the naming of the headers changed see PR to update to CUDA 11.0 below

> <https://github.com/opencv/opencv/pull/17499>
>
> \`\`\`
> force\_builders=Custom
> buildworker:Custom=linux-4
> build\_image:Custom=ubunt…u-cuda11:18.04
> Xbuild\_image:Custom=ubuntu-cuda11:18.04
> \`\`\`

for details.

As @crackwitz alluded to you are using an old version of OpenCV which pre-dates CUDA 11.0 so many many things could fail even if you manage to build it.
