From ba3d6ddada23eaa04f85228bee3438ab479b4442 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 23 Oct 2022 21:50:52 +0100 Subject: gentoo auto-resync : 23:10:2022 - 21:50:51 --- dev-util/nvidia-cuda-toolkit/Manifest | 2 +- .../nvidia-cuda-toolkit-11.8.0-r1.ebuild | 271 +++++++++++++++++++++ .../nvidia-cuda-toolkit-11.8.0.ebuild | 271 --------------------- 3 files changed, 272 insertions(+), 272 deletions(-) create mode 100644 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r1.ebuild delete mode 100644 dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0.ebuild (limited to 'dev-util/nvidia-cuda-toolkit') diff --git a/dev-util/nvidia-cuda-toolkit/Manifest b/dev-util/nvidia-cuda-toolkit/Manifest index 9448c39f210d..e5e51176fe98 100644 --- a/dev-util/nvidia-cuda-toolkit/Manifest +++ b/dev-util/nvidia-cuda-toolkit/Manifest @@ -10,5 +10,5 @@ EBUILD nvidia-cuda-toolkit-11.6.0.ebuild 7885 BLAKE2B 738dddb098d327bc4bcfdb464e EBUILD nvidia-cuda-toolkit-11.6.1.ebuild 7885 BLAKE2B cde8e87114871685e4891be06633065dc181c1ede3c7690a6d8cfe5537f518147862b426d01187c9265c452628b3db340aa1d7bcc3a63507c3d576aa79005ea7 SHA512 aff120e1c3140cb353aa37366d58c9a08185ab4ca603f4161ff33253d1e5fd065ec1a8e9d73490ca8fa2eff87464c1a15a35944b012c93c5d8560f46de1d1b57 EBUILD nvidia-cuda-toolkit-11.6.2.ebuild 7885 BLAKE2B cde8e87114871685e4891be06633065dc181c1ede3c7690a6d8cfe5537f518147862b426d01187c9265c452628b3db340aa1d7bcc3a63507c3d576aa79005ea7 SHA512 aff120e1c3140cb353aa37366d58c9a08185ab4ca603f4161ff33253d1e5fd065ec1a8e9d73490ca8fa2eff87464c1a15a35944b012c93c5d8560f46de1d1b57 EBUILD nvidia-cuda-toolkit-11.7.0-r2.ebuild 7901 BLAKE2B e17c9639dde2e4f3d237a993589a35b2b73ccb881c67a494552dcafc8531286b2f18c6c191453779cd79b2a9c9a93eff611dc359d70156cc9fd32d8f8b21c97c SHA512 146327a76cb8d01808f4537db3bc77ec24cfb5b91c442e33451c7b8fdaad9939a5a2023b30a52eee9052bcc0750dffde1e30b200b2cd66712c403c4e0c58c519 -EBUILD nvidia-cuda-toolkit-11.8.0.ebuild 7901 BLAKE2B 4c3ca921d6f3639fe653195b78e023b9a3aac60b00faeeaa9301d857a9a5ef29223d6619d53a2a658e9e066e47654519767906ab0875408baf5850d8f2d174c0 SHA512 c67fe216257a308a11d03b9439cabb681e607185020549956a8037d7342fe2514369be11c52d75137bf95da6fcb1bb66c98cefba426f519d4b6bf00a9ae1173c +EBUILD nvidia-cuda-toolkit-11.8.0-r1.ebuild 7926 BLAKE2B d42c1047d0b8d32ad6423f44f541a34e9dc9e6b9e5219b278aa3185908244d38d0b393c16b92b287f79383c21d55e4d0974aca302f2da7b8ca7dbb4bd0c9b247 SHA512 27cfdc191f459320547f4cd42185b17870539a8afb35d26acc38d9981fcd96862d5183e6e65f2f5b1e77f891031583ad995e5c8a27ad1cc6393a1ef1de545aff MISC metadata.xml 671 BLAKE2B 20d0b15061270bdb0604e9e76e8913c9d304c51a05102f92b2ef64cddb1b369705a742aefca28f4d36976bb633d0a2cf090bf3d307ea579121578d29c41264e1 SHA512 09fe8a1c60ca7924e433c5aca460d6a757c9962371b3f2a3c42c2ff1b0dd819f1704dd5943bd31a3e74337ad0f14aa4d7836912a435396c15e4f0daaed33800e diff --git a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r1.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r1.ebuild new file mode 100644 index 000000000000..6892b8af6f78 --- /dev/null +++ b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0-r1.ebuild @@ -0,0 +1,271 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs toolchain-funcs unpacker + +DRIVER_PV="520.61.05" + +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" + +# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the +# actual required minimum driver version are different. Lowering the +# bound helps Kepler sm_35 and sm_37 users. +# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions +RDEPEND=" + =x11-drivers/nvidia-drivers-450.80.02 + nsight? ( + dev-libs/libpfm + dev-libs/wayland + || ( + dev-libs/openssl-compat:1.1.1 + =dev-libs/openssl-1.1.1* + ) + sys-libs/zlib + ) + vis-profiler? ( + >=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 9.5 10.3 10.4 11.1 11.2 11.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_{cccl,cudart,cuobjdump,cuxxfilt,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 builds/cuda_profiler_api" "") + $(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}/ncu + ${ncu_dir}/ncu-ui + ${ncu_dir}/nv-nsight-cu + ${ncu_dir}/nv-nsight-cu-cli + ${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/OpenGLVersionChecker + ${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 + + # unbundle libstdc++ + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die + + # unbundle openssl + rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die + + # unbundle libz + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libz.so* || die + + # unbundle libpfm + rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die + + # TODO: unbundle qt5 + # TODO: unbundle boost + # TODO: unbundle icu + # TODO: unbundle mesa + # TODO: unbundle libSshClient + # TODO: unbundle sqlite + 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.8.0.ebuild b/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0.ebuild deleted file mode 100644 index b36b219bb292..000000000000 --- a/dev-util/nvidia-cuda-toolkit/nvidia-cuda-toolkit-11.8.0.ebuild +++ /dev/null @@ -1,271 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -inherit check-reqs toolchain-funcs unpacker - -DRIVER_PV="520.61.05" - -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" - -# since CUDA 11, the bundled toolkit driver (== ${DRIVER_PV}) and the -# actual required minimum driver version are different. Lowering the -# bound helps Kepler sm_35 and sm_37 users. -# https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html#cuda-major-component-versions -RDEPEND=" - =x11-drivers/nvidia-drivers-450.80.02 - nsight? ( - dev-libs/libpfm - dev-libs/wayland - || ( - dev-libs/openssl-compat:1.1.1 - =dev-libs/openssl-1.1.1* - ) - sys-libs/zlib - ) - vis-profiler? ( - >=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 9.5 10.3 10.4 11.1 11.2 11.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_{cccl,cudart,cuobjdump,cuxxfilt,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}/ncu - ${ncu_dir}/ncu-ui - ${ncu_dir}/nv-nsight-cu - ${ncu_dir}/nv-nsight-cu-cli - ${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/OpenGLVersionChecker - ${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 - - # unbundle libstdc++ - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libstdc++.so.6 || die - - # unbundle openssl - rm "${ED}"/${cudadir}/${ncu_dir}/host/linux-desktop-glibc_2_11_3-x64/libssl.so* || die - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libssl.so* || die - - # unbundle libz - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libz.so* || die - - # unbundle libpfm - rm "${ED}"/${cudadir}/${nsys_dir}/host-linux-x64/libpfm.so* || die - - # TODO: unbundle qt5 - # TODO: unbundle boost - # TODO: unbundle icu - # TODO: unbundle mesa - # TODO: unbundle libSshClient - # TODO: unbundle sqlite - 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 -} -- cgit v1.2.3