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 A7AB9158012 for ; Fri, 24 Sep 2021 09:26:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC271E08A2; Fri, 24 Sep 2021 09:26:29 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A8309E08A2 for ; Fri, 24 Sep 2021 09:26:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2A08C342AF7 for ; Fri, 24 Sep 2021 09:26:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 90FAF107 for ; Fri, 24 Sep 2021 09:26:26 +0000 (UTC) From: "David Seifert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "David Seifert" Message-ID: <1632475570.e3006c4d1fd8b391598a5b7e138ebe57fe7aa35a.soap@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/nvidia-cuda-toolkit/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-util/nvidia-cuda-toolkit/Manifest dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild X-VCS-Directories: dev-util/nvidia-cuda-toolkit/ X-VCS-Committer: soap X-VCS-Committer-Name: David Seifert X-VCS-Revision: e3006c4d1fd8b391598a5b7e138ebe57fe7aa35a X-VCS-Branch: master Date: Fri, 24 Sep 2021 09:26:26 +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: c153cf47-b141-4524-996f-6973f45e434a X-Archives-Hash: 9a144024d2800ca456f32d5cedabd69b commit: e3006c4d1fd8b391598a5b7e138ebe57fe7aa35a Author: David Seifert gentoo org> AuthorDate: Fri Sep 24 09:26:10 2021 +0000 Commit: David Seifert gentoo org> CommitDate: Fri Sep 24 09:26:10 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3006c4d dev-util/nvidia-cuda-toolkit: drop 11.1.1-r2, 11.2.2, 11.3.1, 11.4.0, 11.4.1-r2 Closes: https://github.com/gentoo/gentoo/pull/22352 Signed-off-by: David Seifert gentoo.org> dev-util/nvidia-cuda-toolkit/Manifest | 5 - .../nvidia-cuda-toolkit-11.1.1-r2.ebuild | 227 ------------------ .../nvidia-cuda-toolkit-11.2.2.ebuild | 253 --------------------- .../nvidia-cuda-toolkit-11.3.1.ebuild | 252 -------------------- .../nvidia-cuda-toolkit-11.4.0.ebuild | 252 -------------------- .../nvidia-cuda-toolkit-11.4.1-r2.ebuild | 252 -------------------- 6 files changed, 1241 deletions(-) diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index 0afbfad0db5..ecde3cae13e 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -1,7 +1,2 @@ DIST cuda_10.2.89_440.33.01_linux.run 2645419389 BLAKE2B 236aa70a7b45e3636c2c229fffa7d1ca0699ab4365865a73edab607a209c42c2899133dd6a83c61c5929fa754668ad15aec4d847639af1c00a8e6657c8487c77 SHA512 ad8da539ff5df7caf411d1e497ff3d6978cfa8a1fd9150fa4846089e92a604ea56be8631f3efdfe7229a655b8d2d28e6edb32f5731530a77d6f00241cc7aab6e -DIST cuda_11.1.1_455.32.00_linux.run 3532172082 BLAKE2B f4af6bd87c419c002b4913ea7cfcbc84c78e3da485a7ac7dff0da483347cb38bde020e70c7352fe995a2efe0b8e97a156e0536f87aef69ff13fdf6e75fa634d1 SHA512 3da629e6f63548d06050a77d6ad2dbf314db33b2bf4e7d1659f039b3d9ad2ad3f87a6e506ec54db9ca2d21ac7b5ec576748082684bbab3b6642c03d2793d73a9 -DIST cuda_11.2.2_460.32.03_linux.run 3057439068 BLAKE2B c3f3cd9eaaa4f91eb8080e7cafe1280f9bbc9cfc71ce1a6115af1dd348b83d30eed945609bf87e00d4873bede1fa9136fc4a7f393fd31db4e6406dc76086bc22 SHA512 e28d7d2eabd96df9e18f8e55f61adda39b07c2223605f77a6c2d92a02f7b57e9ce8b83d4b4de1124faa5670509d204d3db70c03b18af5cc5964b6ed6653d6a22 -DIST cuda_11.3.1_465.19.01_linux.run 3158494112 BLAKE2B 0316c6a9bf062f2503c94604b51dea9a8d19c516e304e43ccdbc79f305a242664b7f029f7b7086edd7adc37d92a3bae074f005b3be412e1361917794cb824686 SHA512 e2db8b4dcb5f6aee2c3e8a8a6848186cdcdd7cd9d5f4bfd069bd3dc2ea500797c66a4592f0e28dcbee6c3611d1f88b6fda6afcd734aa9ef45f4aa17a1527aedb -DIST cuda_11.4.0_470.42.01_linux.run 3773273383 BLAKE2B 2e466728b6ca9d17dc3caadce13b58c8ba1464c2adeb09739f428aea96f5794c87bf84ca2b81c1019d45223ff5e519503d798032a800a370c7e41517d790f5c4 SHA512 17165102e7f64da77588fd47feeee5ce3f3151a2b482bdc005427ad77ada5d0ff5a51dcd40a27a467cd5988968469476ba90b0191aed993806d284833a08ccb1 -DIST cuda_11.4.1_470.57.02_linux.run 3796641626 BLAKE2B da6a454bb1765833af8c01f2106a1e0f3e33a6a91354a527006fd0335655872b499bb51662c8e224437368ee37c3bf15f0cf0c4bccc02750e46480ceb6b84677 SHA512 a7a2415e6a0ce6a841e15fccc5c6126d8f134ebb7045e11e49d136aed264c236b91cc959320f763d0d7d878d9d83e09310a51c0ac30c926007dae07242a952de DIST cuda_11.4.2_470.57.02_linux.run 3833993301 BLAKE2B b12710da9f31e3255f31dd6b0dab8545463983a4cd1c4432bea027d4e5cc4d1ad9183e09b70ac4ea19c7d3e959df0d19bb41ea896d726e877fd3917a3045a9a4 SHA512 50c80141bfe458aa7216173d9d548f25ade03c68fff59ffe63f842773e5afba7635fb8fd79eda416507e1e88b5fe28b39ac8bdc66b168c73a72995824af5c689 diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild deleted file mode 100644 index c1df314703c..00000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.1.1-r2.ebuild +++ /dev/null @@ -1,227 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="455.32.00" - -DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" -HOMEPAGE="https://developer.nvidia.com/cuda-zone" -SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -BDEPEND="" -RDEPEND=" - =x11-drivers/nvidia-drivers-${DRIVER_PV} - debugger? ( - dev-libs/openssl - sys-libs/libtermcap-compat - sys-libs/ncurses-compat:5[tinfo] - ) - vis-profiler? ( - dev-libs/openssl - >=virtual/jre-1.8:* - )" - -S="${WORKDIR}" - -QA_PREBUILT="opt/cuda/*" - -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - local cuda_supported_gcc - - # ATTENTION: change requires revbump - cuda_supported_gcc="4.7 4.8 4.9 5.3 5.4 6.3 6.4 7.2 7.3 8.2 8.3 8.4 9.2 9.3 10.2" - - sed \ - -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ - "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die - - default -} - -src_install() { - local cudadir=/opt/cuda - local ecudadir="${EPREFIX}${cudadir}" - dodir ${cudadir} - into ${cudadir} - - # Install standard sub packages - local builddirs=( - builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx} - builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") - $(usex vis-profiler "builds/cuda_nvvp" "") - $(usex debugger "builds/cuda_gdb" "") - ) - - local d - for d in "${builddirs[@]}"; do - ebegin "Installing ${d}" - [[ -d ${d} ]] || die "Directory does not exist: ${d}" - - if [[ -d ${d}/bin ]]; then - local f - for f in ${d}/bin/*; do - if [[ -f ${f} ]]; then - dobin "${f}" - else - insinto ${cudadir}/bin - doins -r "${f}" - fi - done - fi - - insinto ${cudadir} - if [[ -d ${d}/targets ]]; then - doins -r "${d}"/targets - fi - if [[ -d ${d}/share ]]; then - doins -r "${d}"/share - fi - if [[ -d ${d}/extras ]]; then - doins -r "${d}"/extras - fi - eend - done - dobin "${T}"/cuda-config - - doins builds/EULA.txt - # nvml and nvvm need special handling - ebegin "Installing nvvm" - doins -r builds/cuda_nvcc/nvvm - exeinto ${cudadir}/nvvm/bin - doexe builds/cuda_nvcc/nvvm/bin/cicc - eend - - ebegin "Installing nvml" - doins -r builds/cuda_nvml_dev/nvml - eend - - if use sanitizer; then - ebegin "Installing sanitizer" - dobin builds/integration/Sanitizer/compute-sanitizer - doins -r builds/cuda_sanitizer_api/Sanitizer - # special handling for the executable - exeinto ${cudadir}/Sanitizer - doexe builds/cuda_sanitizer_api/Sanitizer/compute-sanitizer - eend - fi - - if use vis-profiler; then - ebegin "Installing libnvvp" - doins -r builds/cuda_nvvp/libnvvp - # special handling for the executable - exeinto ${cudadir}/libnvvp - doexe builds/cuda_nvvp/libnvvp/nvvp - eend - fi - - if use nsight; then - local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${ncu_dir}" - mv builds/nsight_compute builds/${ncu_dir} || die - doins -r builds/${ncu_dir} - - exeinto ${cudadir}/${ncu_dir} - doexe builds/${ncu_dir}/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - - exeinto ${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64 - doexe builds/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/{ncu-ui,ncu-ui.bin,CrashReporter} - dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - eend - - local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${nsys_dir}" - mv builds/nsight_systems builds/${nsys_dir} || die - doins -r builds/${nsys_dir} - exeinto ${cudadir}/${nsys_dir}/target-linux-x64 - doexe builds/${nsys_dir}/target-linux-x64/nsys - - exeinto ${cudadir}/${nsys_dir}/host-linux-x64 - doexe builds/${nsys_dir}/host-linux-x64/{nsight-sys,nsight-sys.bin,nsys-ui,CrashReporter,ImportNvtxt,QdstrmImporter,ResolveSymbols} - dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} - eend - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle openssl - # TODO: unbundle mesa - # TODO: unbundle libz - # TODO: unbundle libstdc++ - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - # TODO: unbundle libpfm ? - fi - - # Add include and lib symlinks - dosym "targets/x86_64-linux/include" ${cudadir}/include - dosym "targets/x86_64-linux/lib" ${cudadir}/lib64 - - newenvd - 99cuda <<-EOF - PATH=${ecudadir}/bin$(usex vis-profiler ":${ecudadir}/libnvvp" "") - ROOTPATH=${ecudadir}/bin - LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64$(usex profiler ":${ecudadir}/extras/CUPTI/lib64" "") - EOF - - # Cuda prepackages libraries, don't revdep-build on them - insinto /etc/revdep-rebuild - newins - 80${PN} <<-EOF - SEARCH_DIRS_MASK="${ecudadir}" - EOF - # TODO: Find a better way to add +x permission to installed executables - # TODO: Add pkgconfig files for installed libraries -} - -pkg_postinst_check() { - local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" - local b="0.0" - local v - for v in ${a}; do - ver_test "${v}" -gt "${b}" && b="${v}" - done - - # if gcc and if not gcc-version is at least greatest supported - if tc-is-gcc && \ - ver_test $(gcc-version) -gt "${b}"; then - ewarn - ewarn "gcc > ${b} will not work with CUDA" - ewarn "Make sure you set an earlier version of gcc with gcc-config" - ewarn "or append --compiler-bindir= pointing to a gcc bindir like" - ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" - ewarn "to the nvcc compiler flags" - ewarn - fi -} - -pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - pkg_postinst_check - fi - - if use profiler || use nsight; then - einfo - einfo "nvidia-drivers restrict access to performance counters." - einfo "You'll need to either run profiling tools (nvprof, nsight) " - einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " - einfo "a modprobe configuration file " - einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " - einfo - einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" - einfo - fi -} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild deleted file mode 100644 index a4f5c24e3b1..00000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.2.2.ebuild +++ /dev/null @@ -1,253 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="460.32.03" - -DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" -HOMEPAGE="https://developer.nvidia.com/cuda-zone" -SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -BDEPEND="" -RDEPEND=" - =x11-drivers/nvidia-drivers-${DRIVER_PV} - debugger? ( - dev-libs/openssl - sys-libs/libtermcap-compat - sys-libs/ncurses-compat:5[tinfo] - ) - vis-profiler? ( - dev-libs/openssl - >=virtual/jre-1.8:* - )" - -S="${WORKDIR}" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump - local cuda_supported_gcc="6.5 7.5 8.4 9.3 10.2 10.3" - - sed \ - -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ - "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die - - default -} - -src_install() { - local cudadir=/opt/cuda - local ecudadir="${EPREFIX}${cudadir}" - local pathextradirs ldpathextradirs - dodir ${cudadir} - into ${cudadir} - - # Install standard sub packages - local builddirs=( - builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx} - builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") - $(usex vis-profiler "builds/cuda_nvvp" "") - $(usex debugger "builds/cuda_gdb" "") - ) - - local d f - for d in "${builddirs[@]}"; do - ebegin "Installing ${d}" - [[ -d ${d} ]] || die "Directory does not exist: ${d}" - - if [[ -d ${d}/bin ]]; then - for f in ${d}/bin/*; do - if [[ -f ${f} ]]; then - dobin "${f}" - else - insinto ${cudadir}/bin - doins -r "${f}" - fi - done - fi - - insinto ${cudadir} - if [[ -d ${d}/targets ]]; then - doins -r "${d}"/targets - fi - if [[ -d ${d}/share ]]; then - doins -r "${d}"/share - fi - if [[ -d ${d}/extras ]]; then - doins -r "${d}"/extras - fi - eend - done - dobin "${T}"/cuda-config - - doins builds/EULA.txt - # nvml and nvvm need special handling - ebegin "Installing nvvm" - doins -r builds/cuda_nvcc/nvvm - fperms +x ${cudadir}/nvvm/bin/cicc - eend - - ebegin "Installing nvml" - doins -r builds/cuda_nvml_dev/nvml - eend - - if use sanitizer; then - ebegin "Installing sanitizer" - dobin builds/integration/Sanitizer/compute-sanitizer - doins -r builds/cuda_sanitizer_api/compute-sanitizer - # special handling for the executable - fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer - eend - fi - - use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" - - if use vis-profiler; then - ebegin "Installing libnvvp" - doins -r builds/cuda_nvvp/libnvvp - # special handling for the executable - fperms +x ${cudadir}/libnvvp/nvvp - eend - pathextradirs+=":${ecudadir}/libnvvp" - fi - - if use nsight; then - local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${ncu_dir}" - mv builds/nsight_compute builds/${ncu_dir} || die - doins -r builds/${ncu_dir} - - # check this list on every bump - local exes=( - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - eend - - local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${nsys_dir}" - mv builds/nsight_systems builds/${nsys_dir} || die - doins -r builds/${nsys_dir} - - # check this list on every bump - exes+=( - ${nsys_dir}/host-linux-x64/nsys-ui - ${nsys_dir}/host-linux-x64/nsys-ui.bin - ${nsys_dir}/host-linux-x64/ResolveSymbols - ${nsys_dir}/host-linux-x64/ImportNvtxt - ${nsys_dir}/host-linux-x64/CrashReporter - ${nsys_dir}/host-linux-x64/QdstrmImporter - ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess - ${nsys_dir}/target-linux-x64/nsys - ${nsys_dir}/target-linux-x64/launcher - ${nsys_dir}/target-linux-x64/nvgpucs - ${nsys_dir}/target-linux-x64/nsys-launcher - ${nsys_dir}/target-linux-x64/sqlite3 - ${nsys_dir}/target-linux-x64/python/bin/python - ) - - dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} - eend - - # nsight scripts and binaries need to have their executable bit set, #691284 - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # remove foreign archs (triggers SONAME warning, #749903) - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die - rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle openssl - # TODO: unbundle mesa - # TODO: unbundle libz - # TODO: unbundle libstdc++ - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - # TODO: unbundle libpfm ? - fi - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${cudadir}/include - dosym targets/x86_64-linux/lib ${cudadir}/lib64 - - newenvd - 99cuda <<-EOF - PATH=${ecudadir}/bin${pathextradirs} - ROOTPATH=${ecudadir}/bin - LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} - EOF - - # Cuda prepackages libraries, don't revdep-build on them - insinto /etc/revdep-rebuild - newins - 80${PN} <<-EOF - SEARCH_DIRS_MASK="${ecudadir}" - EOF - # TODO: Add pkgconfig files for installed libraries -} - -pkg_postinst_check() { - local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" - local b="0.0" - local v - for v in ${a}; do - ver_test "${v}" -gt "${b}" && b="${v}" - done - - # if gcc and if not gcc-version is at least greatest supported - if tc-is-gcc && \ - ver_test $(gcc-version) -gt "${b}"; then - ewarn - ewarn "gcc > ${b} will not work with CUDA" - ewarn "Make sure you set an earlier version of gcc with gcc-config" - ewarn "or append --compiler-bindir= pointing to a gcc bindir like" - ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" - ewarn "to the nvcc compiler flags" - ewarn - fi -} - -pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - pkg_postinst_check - fi - - if use profiler || use nsight; then - einfo - einfo "nvidia-drivers restrict access to performance counters." - einfo "You'll need to either run profiling tools (nvprof, nsight) " - einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " - einfo "a modprobe configuration file " - einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " - einfo - einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" - einfo - fi -} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild deleted file mode 100644 index 73058bb4b3c..00000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.3.1.ebuild +++ /dev/null @@ -1,252 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="465.19.01" - -DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" -HOMEPAGE="https://developer.nvidia.com/cuda-zone" -SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" -S="${WORKDIR}" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -BDEPEND="" -RDEPEND=" - =x11-drivers/nvidia-drivers-${DRIVER_PV} - debugger? ( - dev-libs/openssl - sys-libs/libtermcap-compat - sys-libs/ncurses-compat:5[tinfo] - ) - vis-profiler? ( - dev-libs/openssl - >=virtual/jre-1.8:* - )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump - local cuda_supported_gcc="8.5 9.3 9.4 10.2 10.3" - - sed \ - -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ - "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die - - default -} - -src_install() { - local cudadir=/opt/cuda - local ecudadir="${EPREFIX}${cudadir}" - local pathextradirs ldpathextradirs - dodir ${cudadir} - into ${cudadir} - - # Install standard sub packages - local builddirs=( - builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} - builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") - $(usex vis-profiler "builds/cuda_nvvp" "") - $(usex debugger "builds/cuda_gdb" "") - ) - - local d f - for d in "${builddirs[@]}"; do - ebegin "Installing ${d}" - [[ -d ${d} ]] || die "Directory does not exist: ${d}" - - if [[ -d ${d}/bin ]]; then - for f in ${d}/bin/*; do - if [[ -f ${f} ]]; then - dobin "${f}" - else - insinto ${cudadir}/bin - doins -r "${f}" - fi - done - fi - - insinto ${cudadir} - if [[ -d ${d}/targets ]]; then - doins -r "${d}"/targets - fi - if [[ -d ${d}/share ]]; then - doins -r "${d}"/share - fi - if [[ -d ${d}/extras ]]; then - doins -r "${d}"/extras - fi - eend - done - dobin "${T}"/cuda-config - - doins builds/EULA.txt - # nvml and nvvm need special handling - ebegin "Installing nvvm" - doins -r builds/cuda_nvcc/nvvm - fperms +x ${cudadir}/nvvm/bin/cicc - eend - - ebegin "Installing nvml" - doins -r builds/cuda_nvml_dev/nvml - eend - - if use sanitizer; then - ebegin "Installing sanitizer" - dobin builds/integration/Sanitizer/compute-sanitizer - doins -r builds/cuda_sanitizer_api/compute-sanitizer - # special handling for the executable - fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer - eend - fi - - use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" - - if use vis-profiler; then - ebegin "Installing libnvvp" - doins -r builds/cuda_nvvp/libnvvp - # special handling for the executable - fperms +x ${cudadir}/libnvvp/nvvp - eend - pathextradirs+=":${ecudadir}/libnvvp" - fi - - if use nsight; then - local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${ncu_dir}" - mv builds/nsight_compute builds/${ncu_dir} || die - doins -r builds/${ncu_dir} - - # check this list on every bump - local exes=( - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - eend - - local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${nsys_dir}" - mv builds/nsight_systems builds/${nsys_dir} || die - doins -r builds/${nsys_dir} - - # check this list on every bump - exes+=( - ${nsys_dir}/host-linux-x64/nsys-ui - ${nsys_dir}/host-linux-x64/nsys-ui.bin - ${nsys_dir}/host-linux-x64/ResolveSymbols - ${nsys_dir}/host-linux-x64/ImportNvtxt - ${nsys_dir}/host-linux-x64/CrashReporter - ${nsys_dir}/host-linux-x64/QdstrmImporter - ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess - ${nsys_dir}/target-linux-x64/nsys - ${nsys_dir}/target-linux-x64/launcher - ${nsys_dir}/target-linux-x64/nvgpucs - ${nsys_dir}/target-linux-x64/nsys-launcher - ${nsys_dir}/target-linux-x64/sqlite3 - ${nsys_dir}/target-linux-x64/python/bin/python - ) - - dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} - eend - - # nsight scripts and binaries need to have their executable bit set, #691284 - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # remove foreign archs (triggers SONAME warning, #749903) - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die - rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle openssl - # TODO: unbundle mesa - # TODO: unbundle libz - # TODO: unbundle libstdc++ - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - # TODO: unbundle libpfm ? - fi - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${cudadir}/include - dosym targets/x86_64-linux/lib ${cudadir}/lib64 - - newenvd - 99cuda <<-EOF - PATH=${ecudadir}/bin${pathextradirs} - ROOTPATH=${ecudadir}/bin - LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} - EOF - - # Cuda prepackages libraries, don't revdep-build on them - insinto /etc/revdep-rebuild - newins - 80${PN} <<-EOF - SEARCH_DIRS_MASK="${ecudadir}" - EOF - # TODO: Add pkgconfig files for installed libraries -} - -pkg_postinst_check() { - local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" - local b="0.0" - local v - for v in ${a}; do - ver_test "${v}" -gt "${b}" && b="${v}" - done - - # if gcc and if not gcc-version is at least greatest supported - if tc-is-gcc && \ - ver_test $(gcc-version) -gt "${b}"; then - ewarn - ewarn "gcc > ${b} will not work with CUDA" - ewarn "Make sure you set an earlier version of gcc with gcc-config" - ewarn "or append --compiler-bindir= pointing to a gcc bindir like" - ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" - ewarn "to the nvcc compiler flags" - ewarn - fi -} - -pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - pkg_postinst_check - fi - - if use profiler || use nsight; then - einfo - einfo "nvidia-drivers restrict access to performance counters." - einfo "You'll need to either run profiling tools (nvprof, nsight) " - einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " - einfo "a modprobe configuration file " - einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " - einfo - einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" - einfo - fi -} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild deleted file mode 100644 index dc91226db34..00000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.0.ebuild +++ /dev/null @@ -1,252 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="470.42.01" - -DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" -HOMEPAGE="https://developer.nvidia.com/cuda-zone" -SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" -S="${WORKDIR}" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -BDEPEND="" -RDEPEND=" - =x11-drivers/nvidia-drivers-${DRIVER_PV} - debugger? ( - dev-libs/openssl - sys-libs/libtermcap-compat - sys-libs/ncurses-compat:5[tinfo] - ) - vis-profiler? ( - dev-libs/openssl - >=virtual/jre-1.8:* - )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump - local cuda_supported_gcc="8.5 9.3 9.4 10.2 10.3" - - sed \ - -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ - "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die - - default -} - -src_install() { - local cudadir=/opt/cuda - local ecudadir="${EPREFIX}${cudadir}" - local pathextradirs ldpathextradirs - dodir ${cudadir} - into ${cudadir} - - # Install standard sub packages - local builddirs=( - builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} - builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") - $(usex vis-profiler "builds/cuda_nvvp" "") - $(usex debugger "builds/cuda_gdb" "") - ) - - local d f - for d in "${builddirs[@]}"; do - ebegin "Installing ${d}" - [[ -d ${d} ]] || die "Directory does not exist: ${d}" - - if [[ -d ${d}/bin ]]; then - for f in ${d}/bin/*; do - if [[ -f ${f} ]]; then - dobin "${f}" - else - insinto ${cudadir}/bin - doins -r "${f}" - fi - done - fi - - insinto ${cudadir} - if [[ -d ${d}/targets ]]; then - doins -r "${d}"/targets - fi - if [[ -d ${d}/share ]]; then - doins -r "${d}"/share - fi - if [[ -d ${d}/extras ]]; then - doins -r "${d}"/extras - fi - eend - done - dobin "${T}"/cuda-config - - doins builds/EULA.txt - # nvml and nvvm need special handling - ebegin "Installing nvvm" - doins -r builds/cuda_nvcc/nvvm - fperms +x ${cudadir}/nvvm/bin/cicc - eend - - ebegin "Installing nvml" - doins -r builds/cuda_nvml_dev/nvml - eend - - if use sanitizer; then - ebegin "Installing sanitizer" - dobin builds/integration/Sanitizer/compute-sanitizer - doins -r builds/cuda_sanitizer_api/compute-sanitizer - # special handling for the executable - fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer - eend - fi - - use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" - - if use vis-profiler; then - ebegin "Installing libnvvp" - doins -r builds/cuda_nvvp/libnvvp - # special handling for the executable - fperms +x ${cudadir}/libnvvp/nvvp - eend - pathextradirs+=":${ecudadir}/libnvvp" - fi - - if use nsight; then - local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${ncu_dir}" - mv builds/nsight_compute builds/${ncu_dir} || die - doins -r builds/${ncu_dir} - - # check this list on every bump - local exes=( - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - eend - - local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${nsys_dir}" - mv builds/nsight_systems builds/${nsys_dir} || die - doins -r builds/${nsys_dir} - - # check this list on every bump - exes+=( - ${nsys_dir}/host-linux-x64/nsys-ui - ${nsys_dir}/host-linux-x64/nsys-ui.bin - ${nsys_dir}/host-linux-x64/ResolveSymbols - ${nsys_dir}/host-linux-x64/ImportNvtxt - ${nsys_dir}/host-linux-x64/CrashReporter - ${nsys_dir}/host-linux-x64/QdstrmImporter - ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess - ${nsys_dir}/target-linux-x64/nsys - ${nsys_dir}/target-linux-x64/launcher - ${nsys_dir}/target-linux-x64/nvgpucs - ${nsys_dir}/target-linux-x64/nsys-launcher - ${nsys_dir}/target-linux-x64/sqlite3 - ${nsys_dir}/target-linux-x64/python/bin/python - ) - - dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} - eend - - # nsight scripts and binaries need to have their executable bit set, #691284 - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # remove foreign archs (triggers SONAME warning, #749903) - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die - rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle openssl - # TODO: unbundle mesa - # TODO: unbundle libz - # TODO: unbundle libstdc++ - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - # TODO: unbundle libpfm ? - fi - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${cudadir}/include - dosym targets/x86_64-linux/lib ${cudadir}/lib64 - - newenvd - 99cuda <<-EOF - PATH=${ecudadir}/bin${pathextradirs} - ROOTPATH=${ecudadir}/bin - LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} - EOF - - # Cuda prepackages libraries, don't revdep-build on them - insinto /etc/revdep-rebuild - newins - 80${PN} <<-EOF - SEARCH_DIRS_MASK="${ecudadir}" - EOF - # TODO: Add pkgconfig files for installed libraries -} - -pkg_postinst_check() { - local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" - local b="0.0" - local v - for v in ${a}; do - ver_test "${v}" -gt "${b}" && b="${v}" - done - - # if gcc and if not gcc-version is at least greatest supported - if tc-is-gcc && \ - ver_test $(gcc-version) -gt "${b}"; then - ewarn - ewarn "gcc > ${b} will not work with CUDA" - ewarn "Make sure you set an earlier version of gcc with gcc-config" - ewarn "or append --compiler-bindir= pointing to a gcc bindir like" - ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" - ewarn "to the nvcc compiler flags" - ewarn - fi -} - -pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - pkg_postinst_check - fi - - if use profiler || use nsight; then - einfo - einfo "nvidia-drivers restrict access to performance counters." - einfo "You'll need to either run profiling tools (nvprof, nsight) " - einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " - einfo "a modprobe configuration file " - einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " - einfo - einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" - einfo - fi -} diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild deleted file mode 100644 index 1bb05e3bd74..00000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.4.1-r2.ebuild +++ /dev/null @@ -1,252 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="470.57.02" - -DESCRIPTION="NVIDIA CUDA Toolkit (compiler and friends)" -HOMEPAGE="https://developer.nvidia.com/cuda-zone" -SRC_URI="https://developer.download.nvidia.com/compute/cuda/${PV}/local_installers/cuda_${PV}_${DRIVER_PV}_linux.run" -S="${WORKDIR}" - -LICENSE="NVIDIA-CUDA" -SLOT="0/${PV}" -KEYWORDS="-* ~amd64 ~amd64-linux" -IUSE="debugger nsight profiler vis-profiler sanitizer" -RESTRICT="bindist mirror" - -BDEPEND="" -RDEPEND=" - =x11-drivers/nvidia-drivers-${DRIVER_PV} - debugger? ( - dev-libs/openssl - sys-libs/libtermcap-compat - sys-libs/ncurses-compat:5[tinfo] - ) - vis-profiler? ( - dev-libs/openssl - >=virtual/jre-1.8:* - )" - -QA_PREBUILT="opt/cuda/*" -CHECKREQS_DISK_BUILD="6800M" - -pkg_setup() { - check-reqs_pkg_setup -} - -src_prepare() { - # ATTENTION: change requires revbump - local cuda_supported_gcc="8.5 9.4 10.3 11.1 11.2" - - sed \ - -e "s:CUDA_SUPPORTED_GCC:${cuda_supported_gcc}:g" \ - "${FILESDIR}"/cuda-config.in > "${T}"/cuda-config || die - - default -} - -src_install() { - local cudadir=/opt/cuda - local ecudadir="${EPREFIX}${cudadir}" - local pathextradirs ldpathextradirs - dodir ${cudadir} - into ${cudadir} - - # Install standard sub packages - local builddirs=( - builds/cuda_{cudart,cuobjdump,memcheck,nvcc,nvdisasm,nvml_dev,nvprune,nvrtc,nvtx,thrust} - builds/lib{cublas,cufft,curand,cusolver,cusparse,npp,nvjpeg} - $(usex profiler "builds/cuda_nvprof builds/cuda_cupti" "") - $(usex vis-profiler "builds/cuda_nvvp" "") - $(usex debugger "builds/cuda_gdb" "") - ) - - local d f - for d in "${builddirs[@]}"; do - ebegin "Installing ${d}" - [[ -d ${d} ]] || die "Directory does not exist: ${d}" - - if [[ -d ${d}/bin ]]; then - for f in ${d}/bin/*; do - if [[ -f ${f} ]]; then - dobin "${f}" - else - insinto ${cudadir}/bin - doins -r "${f}" - fi - done - fi - - insinto ${cudadir} - if [[ -d ${d}/targets ]]; then - doins -r "${d}"/targets - fi - if [[ -d ${d}/share ]]; then - doins -r "${d}"/share - fi - if [[ -d ${d}/extras ]]; then - doins -r "${d}"/extras - fi - eend - done - dobin "${T}"/cuda-config - - doins builds/EULA.txt - # nvml and nvvm need special handling - ebegin "Installing nvvm" - doins -r builds/cuda_nvcc/nvvm - fperms +x ${cudadir}/nvvm/bin/cicc - eend - - ebegin "Installing nvml" - doins -r builds/cuda_nvml_dev/nvml - eend - - if use sanitizer; then - ebegin "Installing sanitizer" - dobin builds/integration/Sanitizer/compute-sanitizer - doins -r builds/cuda_sanitizer_api/compute-sanitizer - # special handling for the executable - fperms +x ${cudadir}/compute-sanitizer/compute-sanitizer - eend - fi - - use profiler && ldpathextradirs+=":${ecudadir}/extras/CUPTI/lib64" - - if use vis-profiler; then - ebegin "Installing libnvvp" - doins -r builds/cuda_nvvp/libnvvp - # special handling for the executable - fperms +x ${cudadir}/libnvvp/nvvp - eend - pathextradirs+=":${ecudadir}/libnvvp" - fi - - if use nsight; then - local ncu_dir=$(grep -o 'nsight-compute-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${ncu_dir}" - mv builds/nsight_compute builds/${ncu_dir} || die - doins -r builds/${ncu_dir} - - # check this list on every bump - local exes=( - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libexec/QtWebEngineProcess - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/CrashReporter - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui - ${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/ncu-ui.bin - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherTargetLdPreloadHelper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/TreeLauncherSubreaper - ${ncu_dir}/target/linux-desktop-glibc_2_11_3-x64/ncu - ) - - dobin builds/integration/nsight-compute/{ncu,ncu-ui,nv-nsight-cu,nv-nsight-cu-cli} - eend - - local nsys_dir=$(grep -o 'nsight-systems-[0-9][0-9\.]*' -m1 manifests/cuda_x86_64.xml) - ebegin "Installing ${nsys_dir}" - mv builds/nsight_systems builds/${nsys_dir} || die - doins -r builds/${nsys_dir} - - # check this list on every bump - exes+=( - ${nsys_dir}/host-linux-x64/nsys-ui - ${nsys_dir}/host-linux-x64/nsys-ui.bin - ${nsys_dir}/host-linux-x64/ResolveSymbols - ${nsys_dir}/host-linux-x64/ImportNvtxt - ${nsys_dir}/host-linux-x64/CrashReporter - ${nsys_dir}/host-linux-x64/QdstrmImporter - ${nsys_dir}/host-linux-x64/libexec/QtWebEngineProcess - ${nsys_dir}/target-linux-x64/nsys - ${nsys_dir}/target-linux-x64/launcher - ${nsys_dir}/target-linux-x64/nvgpucs - ${nsys_dir}/target-linux-x64/nsys-launcher - ${nsys_dir}/target-linux-x64/sqlite3 - ${nsys_dir}/target-linux-x64/python/bin/python - ) - - dobin builds/integration/nsight-systems/{nsight-sys,nsys,nsys-exporter,nsys-ui} - eend - - # nsight scripts and binaries need to have their executable bit set, #691284 - for f in "${exes[@]}"; do - fperms +x ${cudadir}/${f} - done - - # remove foreign archs (triggers SONAME warning, #749903) - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-glibc_2_19_0-ppc64le || die - rm -r "${ED}"/${cudadir}/${ncu_dir}/target/linux-desktop-t210-a64 || die - rm -r "${ED}"/${cudadir}/${nsys_dir}/target-linux-armv8 || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle openssl - # TODO: unbundle mesa - # TODO: unbundle libz - # TODO: unbundle libstdc++ - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - # TODO: unbundle libpfm ? - fi - - # Add include and lib symlinks - dosym targets/x86_64-linux/include ${cudadir}/include - dosym targets/x86_64-linux/lib ${cudadir}/lib64 - - newenvd - 99cuda <<-EOF - PATH=${ecudadir}/bin${pathextradirs} - ROOTPATH=${ecudadir}/bin - LDPATH=${ecudadir}/lib64:${ecudadir}/nvvm/lib64${ldpathextradirs} - EOF - - # Cuda prepackages libraries, don't revdep-build on them - insinto /etc/revdep-rebuild - newins - 80${PN} <<-EOF - SEARCH_DIRS_MASK="${ecudadir}" - EOF - # TODO: Add pkgconfig files for installed libraries -} - -pkg_postinst_check() { - local a="$(${EROOT}/opt/cuda/bin/cuda-config -s)" - local b="0.0" - local v - for v in ${a}; do - ver_test "${v}" -gt "${b}" && b="${v}" - done - - # if gcc and if not gcc-version is at least greatest supported - if tc-is-gcc && \ - ver_test $(gcc-version) -gt "${b}"; then - ewarn - ewarn "gcc > ${b} will not work with CUDA" - ewarn "Make sure you set an earlier version of gcc with gcc-config" - ewarn "or append --compiler-bindir= pointing to a gcc bindir like" - ewarn "--compiler-bindir=${EPREFIX}/usr/*pc-linux-gnu/gcc-bin/gcc${b}" - ewarn "to the nvcc compiler flags" - ewarn - fi -} - -pkg_postinst() { - if [[ ${MERGE_TYPE} != binary ]]; then - pkg_postinst_check - fi - - if use profiler || use nsight; then - einfo - einfo "nvidia-drivers restrict access to performance counters." - einfo "You'll need to either run profiling tools (nvprof, nsight) " - einfo "using sudo (needs cap SYS_ADMIN) or add the following line to " - einfo "a modprobe configuration file " - einfo "(e.g. /etc/modprobe.d/nvidia-prof.conf): " - einfo - einfo "options nvidia NVreg_RestrictProfilingToAdminUsers=0" - einfo - fi -}