From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AAB76158287 for ; Fri, 16 May 2025 11:27:50 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 95ED43436C7 for ; Fri, 16 May 2025 11:27:50 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 92C4C1103C0; Fri, 16 May 2025 11:27:49 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 84ECF1103C0 for ; Fri, 16 May 2025 11:27:49 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3946B3436B8 for ; Fri, 16 May 2025 11:27:49 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 97C32DA7 for ; Fri, 16 May 2025 11:27:47 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1747394838.fc6dc8aa07f880e1b962da200ff6c53204f94675.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/opencv/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-libs/opencv/opencv-4.11.0.ebuild X-VCS-Directories: media-libs/opencv/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: fc6dc8aa07f880e1b962da200ff6c53204f94675 X-VCS-Branch: master Date: Fri, 16 May 2025 11:27:47 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c14cbd79-12ad-4812-b7e6-399c2a8ece57 X-Archives-Hash: a7c1bb9eb33fc62d78268341c29253be commit: fc6dc8aa07f880e1b962da200ff6c53204f94675 Author: Paul Zander gmail com> AuthorDate: Wed May 14 16:20:00 2025 +0000 Commit: Sam James gentoo org> CommitDate: Fri May 16 11:27:18 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc6dc8aa media-libs/opencv: pass CMAKE_CUDA_ARCHITECTURES for FindOpenMP cmake-3.31.0 extended FindOpenMP.cmake to look up CUDA flags and detect compute capabilites if the CUDA language support is enabled. This requires write access to /dev/nvidiactl. Iff the portage user is not in the video group this will fail. To avoid this we set the lowest supported architecture by CUDA-11.8 and 12.x, sm_50. This can be overridden by setting CUDAARCHS. Closes: https://bugs.gentoo.org/955860 Signed-off-by: Paul Zander gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42091 Signed-off-by: Sam James gentoo.org> media-libs/opencv/opencv-4.11.0.ebuild | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/media-libs/opencv/opencv-4.11.0.ebuild b/media-libs/opencv/opencv-4.11.0.ebuild index e28d08a36b61..237485b74dc8 100644 --- a/media-libs/opencv/opencv-4.11.0.ebuild +++ b/media-libs/opencv/opencv-4.11.0.ebuild @@ -929,22 +929,27 @@ multilib_src_configure() { tc-export CC CXX if multilib_native_use cuda; then - cuda_add_sandbox -w - addwrite "/proc/self/task" - addpredict "/dev/char/" - - if ! test -w /dev/nvidiactl; then + if ! SANDBOX_WRITE=/dev/nvidiactl test -w /dev/nvidiactl; then # eqawarn "Can't access the GPU at /dev/nvidiactl." # eqawarn "User $(id -nu) is not in the group \"video\"." if [[ -z "${CUDA_GENERATION}" ]] && [[ -z "${CUDA_ARCH_BIN}" ]]; then # build all targets mycmakeargs+=( -DCUDA_GENERATION="" + -DCMAKE_CUDA_ARCHITECTURES="${CUDAARCHS:-50}" # breaks with openmp otherwise.. ) fi else + cuda_add_sandbox -w + addwrite "/proc/self/task" + addpredict "/dev/char/" + : "${CUDAARCHS:="$(cuda_get_host_native_arch)"}" export CUDAARCHS + mycmakeargs+=( + -DCUDA_GENERATION="${CUDAARCHS}" + -DCMAKE_CUDA_ARCHITECTURES="${CUDAARCHS}" + ) fi local -x CUDAHOSTCXX CUDAHOSTLD