Reported here:
http://bugs.debian.org/882505
Patch by Andreas Beckmann
Differential D40453
Add the nvidia-cuda-toolkit Debian package path to search path sylvestre.ledru on Nov 25 2017, 1:25 AM. Authored by
Details
Diff Detail Event TimelineComment Actions The change looks good in general and is small enough and last in the candidates list to not break working setups. What concerns me is that we have to do the same for every distribution (I know that Arch Linux for example has CUDA installed in /opt/cuda, see https://www.archlinux.org/packages/community/x86_64/cuda/). In addition many HPC systems use the modules system to install multiple versions in parallel. As such we should make the installation detection smarter:
I think 2. would work for Arch Linux which adds /opt/cuda/bin to PATH IIRC. I'm not sure about Debian though, @sylvestre.ledru? If that doesn't work, we have to add the candidate statically anyway... Comment Actions Debian packages don't update the PATH and we are aiming at providing packages working out of the box. In general, yeah, we have to do that for every distros... :/ Comment Actions I'm reluctant to add a distribution-specific search path unconditionally. We do have Distro.IsDebian() https://github.com/llvm-mirror/clang/blob/9f9177d3ef72580ca29e8844327f63d7aa1908af/include/clang/Driver/Distro.h#L112 Adding distribution-specific path for particular distribution would be fine with me.
Comment Actions On a related note please add context to your patch as described here: https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface |
No need for a named temporary. if (Distro(D.getVFS).IsDebian()) should do.
Also, please add a comment describing why Debian needs a special case here and include reference to the bug report which has the details.