support for older GPU targets (i.e »Kepler« / sm_30 ) was removed with version 11 .0 of nvidia-cuda-toolkit, after target deprecation in 10.2 However, opencv 4.1 CMake invokes NVCC to generate code for "arch=compute_30,code=sm_30" which causes nvcc from version 11 to fail during build: > .. > nvcc fatal : Unsupported gpu architecture 'compute_30' > CMake Error at cuda_compile_1_generated_gpu_mat.cu.o.Gentoo.cmake:222 (message): > Error generating > /var/tmp/portage/media-libs/opencv-4.1.2-r3/work/opencv-4.1.2-abi_x86_64.amd64/modules/core/CMakeFiles/cuda_compile_1.dir/src/cuda/./cuda_compile_1_generated_gpu_mat.cu.o > .. Reproducible: Always Steps to Reproduce: try to emerge USE=cuda =media-libs/opencv-4.1.2-r3 with =dev-util/nvidia-cuda-toolkit-11.0.3 installed maybe a version bump of media-libs/opencv will do? upstream lists 4.4.0 as latest version. Despite, at least the current version of opencv in the tree should block >=dev-util/nvidia-cuda-toolkit-11.* from being installed alongside
meanwhile, I browsed through https://github.com/opencv/opencv/ .. It seems that cuda-11 support to opencv has yet only been added to the master branch (https://github.com/opencv/opencv/pull/17499) and still pending a release.
also this little gem (-> https://github.com/opencv/opencv/commit/d92af2aa85e55e46c11a9c7732efe7177694fa35 ) seems to have introduced an option to configure if those deprecated/removed targets should be included at all
Please attach the entire build log to this bug report. Please post your `emerge --info' output in a comment.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=83780dade6becfbff566eb2e26a0ece5b1284063 commit 83780dade6becfbff566eb2e26a0ece5b1284063 Author: Ross Charles Campbell <rossbridger.cc@gmail.com> AuthorDate: 2020-09-29 14:47:41 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-10-07 17:55:00 +0000 media-libs/opencv: version bump to 4.4.0 Currently the following improvements are made: - Added python 3.{8,9} support. - Added LTO (Link Time Optimization) support. - Added OVIS (Ogre Vision Module) support. - Renewed wrapped headers list for multilib. - No longer need to download external files at compile time. Closes: https://bugs.gentoo.org/745378 Closes: https://bugs.gentoo.org/744097 Closes: https://bugs.gentoo.org/718038 Closes: https://bugs.gentoo.org/702642 Closes: https://bugs.gentoo.org/703760 Package-Manager: Portage-3.0.8, Repoman-3.0.1 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/17307 Signed-off-by: Sam James <sam@gentoo.org> media-libs/opencv/Manifest | 3 + ...pencv-4.4.0-disable-native-cpuflag-detect.patch | 26 + media-libs/opencv/metadata.xml | 3 + media-libs/opencv/opencv-4.4.0.ebuild | 546 +++++++++++++++++++++ profiles/base/package.use.mask | 5 + 5 files changed, 583 insertions(+)