nbody errors in verification step of CUDA 7.5 installation

Hi.

I encounter errors (see below make log) while running “make” for the “nbody” example to check my CUDA 7.5 installation. It was advice that -rpath or -path-link be used to fix the problem but I don’t know how to implement it. Can someone show me how can I resolve the problems faced by make? Appreciate your kind help. :)

Using UBUNTU 15:10 OS updated with Linux 4.3 kernel and NVIDIA 352.41 (proprietary) driver.

/usr/local/cuda-7.5/bin/nvcc -ccbin g++ -m64 -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o nbody bodysystemcuda.o nbody.o render_particles.o -L…/…/common/lib/linux/x86_64 -L/usr/lib/“nvidia-352” -lGL -lGLU -lX11 -lglut -lGLEW
/usr/bin/ld: warning: libnvidia-tls.so.352.41, needed by /usr/lib/nvidia-352/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvidia-glcore.so.352.41, needed by /usr/lib/nvidia-352/libGL.so, not found (try using -rpath or -rpath-link)
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv018tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv017glcore’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv023tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv016glcore’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv015tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv019tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv000glcore' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv017tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv013tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv024tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv022tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv007tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv009tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv020tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv014glcore' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv015glcore’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv016tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv001glcore’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv024glcore' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv008tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv006tls' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv021tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv023glcore' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv011tls’
/usr/lib/nvidia-352/libGL.so: undefined reference to _nv020glcore' /usr/lib/nvidia-352/libGL.so: undefined reference to _nv027glcore’
/usr/lib/nvidia-352/libGL.so: undefined reference to `_nv014tls’
collect2: error: ld returned 1 exit status
Makefile:254: recipe for target ‘nbody’ failed
make: *** [nbody] Error 1

Ubuntu 15.10 is not a supported distro/version for any CUDA toolkit, nor is your updated Linux 4.3 kernel.

My suggestion would be to switch to a supported configuration with a clean load of the OS, and you are likely to eliminate your problems.
The supported configurations are covered in the documentation:

http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#system-requirements

Hi txbob.

Thanks for your suggestion.

I am exploring if there is a work around the problem other than per your suggestion?
Someone has reported cuda 7.5 setup in Ubuntu 15.10. See http://askubuntu.com/questions/693145/installing-cuda-7-5-toolkit-on-ubuntu-15-10.
I am pushing the boundary further with using the newer kernel as it is suppose to better serve Skylake systems.
I wonder if the long list of “undefined reference” is caused by the 2 warnings preceeding them and if the solution may be just about finding a way to help /usr/lib/nvidia-352/libGL.so find libnvidia-tls.so.352.41 and libnvidia-glcore.so.352.41?

Are libnvidia-tls.so.352.41 and libnvidia-glcore.so.352.41 present on your system somewhere?

If so, what are the paths to those files?

Are those paths on your LD_LIBRARY_PATH ?

Yes they are.

libnvidia-tls.so.352.41 in /usr/lib32/nvidia-352 and /usr/lib32/nvidia-352/tls
libnvidia-glcore.so.352.41 in /usr/lib32/nvidia-352

Does not to appear so:
LD_LIBRARY_PATH=/usr/local/cuda-7.5/

/usr/lib/nvidia-352/libGL.so does not appear to know that both libnvidia-tls.so.352.41 and libnvidia-glcore.so.352.41 are in a folder one level higher than it, which is odd. Do you know how to instruct libGL.so? Is libGL.so editable?

/usr/lib32 doesn’t sound right to me. I’m not sure those are the correct library versions.

If those are the 32-bit versions of the libraries, they won’t be usable in a 64-bit linked application. It’s not clear the 64-bit versions of the libraries got installed on your machine.

I’m pretty sure I won’t be able to help in this endeavor.

Thanks txbob.

I have noticed other issues on my installation and decided to shelf this work.