After following the steps above you may need to do the following to build the examples
- The Makefiles don’t pay attention to LD_LIBRARY_PATH or the ldconfig. Assuming you installed to /usr/local, they use the path /usr/local/cuda/lib64 but disregard the /usr/lib64/nvidia/ directory in which the libcuda*so is located.
To fix ad a symlink in the /usr/local/cuda/lib64 directory:
$ cd /usr/local/cuda/lib64
$ ln -s /usr/lib64/nvidia/libcuda.so libcuda.so
Run make from the /usr/local/cuda/samples directory as follows:
make -k EXTRA_NVCCFLAGS="–pre-include /usr/local/include/undef_atomics_int128.h"
where /usr/local/include/undef_atomics_int128.h is the header file constructed in the previous post.
The “-k” tells make to continue even if a particular example fails to build, e.g. for examples requiring something you don’t have installed such as mpi.