FS#62258 - [cuda] CUDA samples don't compile on Arch install by default as Arch doesn't use standard paths
Attached to Project:
Community Packages
Opened by Julien Chappuis (Jubijub) - Saturday, 06 April 2019, 18:38 GMT
Last edited by Balló György (City-busz) - Wednesday, 10 April 2019, 08:21 GMT
Opened by Julien Chappuis (Jubijub) - Saturday, 06 April 2019, 18:38 GMT
Last edited by Balló György (City-busz) - Wednesday, 10 April 2019, 08:21 GMT
|
Details
Description: CUDA samples don compile by default as they
expect cuda to be installed in /usr/local/cuda and ignore
$PATH and $LD_LIBRARY_PATH variables.
Additional info: * package version(s) : 10.1.105-6 Steps to reproduce: * pacman -S cuda * edit path as instructed, and confirm via nvcc -V that CUDA is installed properly, and that both $PATH and $LD_LIBRARY_PATH both contain the proper /opt/cuda paths. * copy /opt/cuda/samples somewhere (the copy script in samples/bin won't work either) * go to 1_Utilities/deviceQuery Actual result : * make fails with this error message : make: /usr/local/cuda/bin/nvcc: Command not found * after investigating, the culprit is the Makefile : they contain a reference to CUDA_PATH (search for) # Location of the CUDA toolkit CUDA_PATH ?= /usr/local/cuda Workaround : * changing the cuda path to /opt/cuda and make will compile properly Expected results : * Default samples should compile without having to tweak Makefiles (this may warrant a bug upstream, as I don see the point of hardcoding this value. the variable CUDA_PATH is used twice in the Makefile, one to indicate the path to NVCC, the other the path to the lib, so it makes $PATH and $LD_LIBRARY_PATH useless (I suspect they put it because nvcc not found seems to be an immensely popular issue) |
This task depends upon
Closed by Balló György (City-busz)
Wednesday, 10 April 2019, 08:21 GMT
Reason for closing: Duplicate
Additional comments about closing: FS#62282
Wednesday, 10 April 2019, 08:21 GMT
Reason for closing: Duplicate
Additional comments about closing:
For your convenience, I think you can add the following commands into your .bashrc or .zshrc temporally:
export PATH=/opt/cuda/bin:$PATH
export LD_LIBRARY_PATH=/opt/cuda/targets/x86_64-linux/lib:$LD_LIBRARY_PATH