jdenny added a comment. @tra, @Hahnfeld: Thanks for your replies.
In D55269#1318901 <https://reviews.llvm.org/D55269#1318901>, @tra wrote: > I'm not sure that's something that needs to be fixed in clang. > > IIUIC, Debian has added a shim that pretends to be a monolithic CUDA install: > https://bugs.launchpad.net/ubuntu/+source/clang/+bug/1706326 > That change seems to be in Ubuntu bionic (18.04) > https://packages.ubuntu.com/en/bionic/nvidia-cuda-toolkit apt confirms that's what I have: nvidia-cuda-toolkit 9.1.85-3ubuntu1 > With that fix in place --cuda-path=/usr/lib/cuda should work. Seems to. To be clear, I'm trying to address the use case where cmake/clang finds the cuda installation automatically. > --cuda-path=/usr was never supposed to work -- /usr is *not* the root of the > CUDA SDK. /usr/lib/cuda/bin/nvcc doesn't exist, so that's probably why FindCUDA.cmake finds /usr/bin/nvcc (also installed by nvidia-cuda-toolkit). Is it fair then to say that /usr/lib/cuda isn't the root either? > I guess that just adding the check for isUbuntu() should make clang work on > Ubuntu 18.04+. It fixes the first issue I reported. It does not fix the second. It seems that nvidia-cuda-toolkit still isn't installing a complete CUDA install in one location. Even if it installed it all to /usr/lib/cuda, FindCUDA.cmake would probably still see /usr/bin/nvcc and assume /usr is the CUDA install root. What's the path forward? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55269/new/ https://reviews.llvm.org/D55269 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits