updated dev-utils/nvidia-cuda-toolkit from 10.0.140 to 10.1.105 Version 10.1.105 seems to mangle to cuda file structure. Upon installing, $CUDA_HOME/bin/crt/link.stub and $CUDA_HOME/bin/crt/prelink.stub have been moved into $CUDA_HOME/bin, which breaks nvcc. > nlewis-desktop ~ » nvcc /tmp/test.cu > gcc: error: /opt/cuda/bin/crt/link.stub: No such file or directory > gcc: warning: ‘-x c++’ after last input file has no effect > gcc: fatal error: no input files > compilation terminated. The directories for $CUDA_HOME/include and $CUDA_HOME/lib64 were also empty. These are supposed to be symlinks which point at $CUDA_HOME/targets/<machine>-linux/include and $CUDA_HOME/targets/<machine>-linux/lib respectively. Doing a clean install (unmerge, rm -rf /opt/cuda, then emerge again) of the package had the symlinks to be created correctly, but doing the update seems to cause them to be empty folders. However, the link.stub and prelink.stub files are still not in the bin/crt folder, but rather in the bin folder. "ebuild nvidia-cuda-toolkit-10.1.105 configure" creates the correct folder hierarchy, but somewhere between there and being installed moves the files out of crt.
I suspect that the following is flattening the bin folders: dodir ${cudadir} || die # Install binaries separately to amke sure the X permission is set into ${cudadir} || die dobin $(find bin nvvm/bin -type f) || die find bin nvvm/bin -type f -delete || die # Install the rest insinto ${cudadir} || die doins -r * || die compared with the previous ebuild (10.0.130) dodir ${cudadir} mv * "${ED%/}${cudadir}" || die
*it also has the side effect of moving $CUDA_HOME/nvvm/bin/cicc to $CUDA_HOME/bin/cicc, but I don't know if this is intended behavior or not.
Created attachment 574164 [details, diff] patch proposal
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae90e7d8c2d34aed7961f2de107959cb8605559c commit ae90e7d8c2d34aed7961f2de107959cb8605559c Author: Jason Zaman <perfinion@gentoo.org> AuthorDate: 2019-04-29 13:22:00 +0000 Commit: Jason Zaman <perfinion@gentoo.org> CommitDate: 2019-04-29 13:28:45 +0000 dev-util/nvidia-cuda-toolkit-10.1.105: Fix installation location of executables Fixes failures when invoking nvcc. link.stub and prelink.stub need to be in crt subdirectory otherwise nvcc fails to find them. Also extras/demo_suite were not executable. Thanks to Jan Vesely and Nathaniel R. Lewis, this fix was derived from patches from them. Closes: https://github.com/gentoo/gentoo/pull/11735 Closes: https://bugs.gentoo.org/684392 Signed-off-by: Jason Zaman <perfinion@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11 ....ebuild => nvidia-cuda-toolkit-10.1.105-r1.ebuild} | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)