Created attachment 913654 [details, diff] change how the version is parsed from `ncc --version` and also how g++ compilers are found that are candidates for being CUDA host C++ compilers opencv is very careful to support also old CUDA versions. I understand that Gentoo has decided to drop support for CUDA 10.2 I have been working on an overlay to support CUDA 10.2, because software I want to use requires CUDA and my GPU is fairly ancient and is only supported until CUDA 10.2 There are 2 patches required to make this work. Patch "Allow opencv compatibility with CUDA 10.2" changes how the version is parsed from `ncc --version` and also how g++ compilers are found that are candidates for being CUDA host C++ compilers. The 2nd patch needs to be applied to the opencv_contrib directory and is a cherry-pick from the opencv_contrib repository. It makes some modifications pertaining to CUDA 12.4+ compatibility dependent on such version and hence unbreak CUDA 10.2 compatibility.
Created attachment 913655 [details, diff] Patch to make changes pertaining to CUDA 12.4+ only apply for such versions
BTW, I understand Gentoo has decided to drop CUDA 10.2 compatibility, but both changes introduced by the patches are fairly small IMHO and address fairly generic issues which is why I believe this change should go into the mainline repository instead of my cuda-10.2 overlay.
What card or shader model are we talking about 3.0? I'll backport the patch, but the ebuild changes can't go in like that. Can you provide the output of your nvcc --version please? Note that you can already set NVCC_CCBIN in your env so changing the check isn't even needed.
(In reply to Paul Zander from comment #3) > What card or shader model are we talking about 3.0? I'm interested in getting CUDA working for my NVidia GT 750M. It is compute3.0. > Can you provide the output of your nvcc --version please? nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA Corporation Built on Wed_Oct_23_19:24:38_PDT_2019 Cuda compilation tools, release 10.2, V10.2.89 > Note that you can already set NVCC_CCBIN in your env so changing the check > isn't even needed. That would be good enough for me, actually.
@Dirk: which useflags did you use for a successful building?