Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 744097 - media-libs/opencv-4.1.2-r3 USE=cuda with >=dev-util/nvidia-cuda-toolkit-11.* - nvcc fatal : Unsupported gpu architecture 'compute_30'
Summary: media-libs/opencv-4.1.2-r3 USE=cuda with >=dev-util/nvidia-cuda-toolkit-11.* ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amy Liffey
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2020-09-22 13:20 UTC by Christian Bricart
Modified: 2020-10-07 17:55 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Bricart 2020-09-22 13:20:31 UTC
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
Comment 1 Christian Bricart 2020-09-22 14:01:54 UTC
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.
Comment 2 Christian Bricart 2020-09-22 14:16:56 UTC
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
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2020-09-23 04:59:17 UTC
Please attach the entire build log to this bug report.
Please post your `emerge --info' output in a comment.
Comment 4 Larry the Git Cow gentoo-dev 2020-10-07 17:55:08 UTC
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(+)