From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 73044139355 for ; Mon, 2 Aug 2021 20:52:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5D50CE08EC; Mon, 2 Aug 2021 20:52:17 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 268EEE08EC for ; Mon, 2 Aug 2021 20:52:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E3155343C89 for ; Mon, 2 Aug 2021 20:52:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4ACFB7A7 for ; Mon, 2 Aug 2021 20:52:14 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1627937386.582031cbf749c6a79ba6b0b6f09b6754857c5915.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/vtk/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/vtk/vtk-9.0.1.ebuild X-VCS-Directories: sci-libs/vtk/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: 582031cbf749c6a79ba6b0b6f09b6754857c5915 X-VCS-Branch: master Date: Mon, 2 Aug 2021 20:52:14 +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: 03fc4f3b-0405-44eb-bbb5-b759190e4393 X-Archives-Hash: dcfecac803094480e589f44956e7e33f commit: 582031cbf749c6a79ba6b0b6f09b6754857c5915 Author: Bernd Waibel posteo net> AuthorDate: Sun Aug 1 14:56:15 2021 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Mon Aug 2 20:49:46 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=582031cb sci-libs/vtk: fix auto-detection of CUDA arch In some cases, the CUDA architecture is not successfully detected, when 'native' is passed to the build system. For this, check for the environment variable VTK_CUDA_ARCH to be exported and pass that value from the environment instead, if it's a valid CUDA architecture name. This ignores the 'fermi' architecture, as it's no longer supported by current dev-util/nvidia-cuda-toolkit-11* versions. Closes: https://bugs.gentoo.org/803818 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Bernd Waibel posteo.net> Closes: https://github.com/gentoo/gentoo/pull/21855 Signed-off-by: Ionen Wolkens gentoo.org> sci-libs/vtk/vtk-9.0.1.ebuild | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/sci-libs/vtk/vtk-9.0.1.ebuild b/sci-libs/vtk/vtk-9.0.1.ebuild index 6e0717f814c..a38e3f1c327 100644 --- a/sci-libs/vtk/vtk-9.0.1.ebuild +++ b/sci-libs/vtk/vtk-9.0.1.ebuild @@ -41,7 +41,7 @@ RESTRICT="!test? ( test )" REQUIRED_USE=" all-modules? ( boost ffmpeg gdal imaging mysql odbc postgres qt5 rendering theora views ) - cuda? ( X ) + cuda? ( X video_cards_nvidia ) java? ( rendering ) python? ( ${PYTHON_REQUIRED_USE} ) qt5? ( X rendering ) @@ -294,7 +294,28 @@ src_configure() { fi if use cuda; then - mycmakeargs+=( -DVTKm_CUDA_Architecture="native" ) + local cuda_arch= + case ${VTK_CUDA_ARCH:-native} in + # we ignore fermi arch, because current nvidia-cuda-toolkit-11* + # no longer supports it + kepler|maxwell|pascal|volta|turing|ampere|all) + cuda_arch=${VTK_CUDA_ARCH} + ;; + native) + ewarn "If auto detection fails for you, please try and export the" + ewarn "VTK_CUDA_ARCH environment variable to one of the common arch" + ewarn "names: kepler, maxwell, pascal, volta, turing, ampere or all." + cuda_arch=native + ;; + *) + eerror "Please properly set the VTK_CUDA_ARCH environment variable to" + eerror "one of: kepler, maxwell, pascal, volta, turing, ampere, all" + die "Invalid CUDA architecture given: '${VTK_CUDA_ARCH}'!" + ;; + esac + ewarn "Using CUDA architecture '${cuda_arch}'" + + mycmakeargs+=( -DVTKm_CUDA_Architecture=${cuda_arch} ) fi if use ffmpeg; then