Hello,
Reaching out on behalf of a spack
PR trying to get gcc+nvptx
to build, which is revealing our setup seems to have some discrepancies with how we treat the driver vs runtime api’s.
- Should
libcuda.so
ever show up in-L/path/
compiler invocations or be rpath’d into anything? (Our current answer is no, thesetup_dependent_package
just makes it available for thegcc
package to see it inspec['cuda']
). - The runtime libs
libcudart.so
should always be available via-L{/path/}
entries and rpath’d into binaries, and available in$LD_LIBRARY_PATH
for consuming packages? (Currently our answer is yes, thelibs
property has that effect). - Should we be masking out either
compat
orstubs
directories when considering either or both of these APIs? E.g., for (2), currently in that PR we would be having bothcompat
andstubs
show up in e.g.,$LD_LIBRARY_PATH
. I think we want to mask it out for both driver and runtime side but do not know what these are for. - Probably related to (3), do these answers change if we ever get to cross-compiling?
Thanks for any help, I hope this question makes sense! When comparing runfile vs system package manager installs, and where libcuda.so
may show up, I got kind of turned around. It could also come from e.g., /usr/lib64
from an updated (non-CUDA) nvidia driver install right? (spack
currently hides that directory). I’ve only toyed with the driver API for shiggles, but never really had to deal with the logistics of the build system :)