Tuesday, May 23, 2017

Installing CUDA on Ubuntu 12.04 with nvidia driver 295.59

I have been trying to get cuda to run on a nvidia gt 650m based laptop. I am running Ubuntu 12.04 with the nvidia 295.59 driver. Also, my laptop uses Optimus so I have install the driver via bumblebee. Bumblebee is not working correctly yet -- however I believe it is possible to install CUDA independently.



To install CUDA I have followed the instructions detailed here:
How can I get nVidia CUDA or OpenCL working on a laptop with nVidia discrete card/Intel Integrated Graphics?



However I am still running into problem building the sdk. I made the changes specified at the above link in common.mk, but I got the following (snippet) from the build process:



    make[2]: Entering directory `/home/john/NVIDIA_GPU_Computing_SDK/C/src/fluidsGL'
/usr/bin/ld: warning: libnvidia-tls.so.302.17, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libnvidia-glcore.so.302.17, needed by /usr/lib/nvidia-current/libGL.so, not found (try using -rpath or -rpath-link)

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv018tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv012glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv017glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv012tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv015tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv019tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv000glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv017tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv013tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv013glcore'

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv018glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv022tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv007tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv009tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv020tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv014glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv015glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv016tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv001glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv006tls'

/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv021tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv011tls'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv020glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv019glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv002glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv021glcore'
/usr/lib/nvidia-current/libGL.so: undefined reference to `_nv014tls'
collect2: ld returned 1 exit status
make[2]: *** [../../bin/linux/release/fluidsGL] Error 1
make[2]: Leaving directory `/home/john/NVIDIA_GPU_Computing_SDK/C/src/fluidsGL'

make[1]: *** [src/fluidsGL/Makefile.ph_build] Error 2
make[1]: Leaving directory `/home/john/NVIDIA_GPU_Computing_SDK/C'
make: *** [all] Error 2


The libraries that ld warns about are on my system and are installed on the system:



    $ locate libnvidia-tls.so.302.17 libnvidia-glcore.so.302.17
/usr/lib/nvidia-current/libnvidia-glcore.so.302.17
/usr/lib/nvidia-current/libnvidia-tls.so.302.17

/usr/lib/nvidia-current/tls/libnvidia-tls.so.302.17
/usr/lib32/nvidia-current/libnvidia-glcore.so.302.17
/usr/lib32/nvidia-current/libnvidia-tls.so.302.17
/usr/lib32/nvidia-current/tls/libnvidia-tls.so.302.17


however /usr/lib/nvidia-current and /usr/lib32/nvidia-current are not being picked up by ldconfig. I have tried adding them by adding a file to /etc/ld.so.conf.d/ which gets past this error, however now I am getting the following error:



    make[2]: Entering directory `/home/john/NVIDIA_GPU_Computing_SDK/C/src/deviceQueryDrv'
cc1plus: warning: command line option ‘-Wimplicit’ is valid for C/ObjC but not for C++ [enabled by default]

obj/x86_64/release/deviceQueryDrv.cpp.o: In function `main':
deviceQueryDrv.cpp:(.text.startup+0x5f): undefined reference to `cuInit'
deviceQueryDrv.cpp:(.text.startup+0x99): undefined reference to `cuDeviceGetCount'
deviceQueryDrv.cpp:(.text.startup+0x10b): undefined reference to `cuDeviceComputeCapability'
deviceQueryDrv.cpp:(.text.startup+0x127): undefined reference to `cuDeviceGetName'
deviceQueryDrv.cpp:(.text.startup+0x16a): undefined reference to `cuDriverGetVersion'
deviceQueryDrv.cpp:(.text.startup+0x1f0): undefined reference to `cuDeviceTotalMem_v2'
deviceQueryDrv.cpp:(.text.startup+0x262): undefined reference to `cuDeviceGetAttribute'
deviceQueryDrv.cpp:(.text.startup+0x457): undefined reference to `cuDeviceGetAttribute'
deviceQueryDrv.cpp:(.text.startup+0x4bc): undefined reference to `cuDeviceGetAttribute'

deviceQueryDrv.cpp:(.text.startup+0x502): undefined reference to `cuDeviceGetAttribute'
deviceQueryDrv.cpp:(.text.startup+0x533): undefined reference to `cuDeviceGetAttribute'
obj/x86_64/release/deviceQueryDrv.cpp.o:deviceQueryDrv.cpp:(.text.startup+0x55e): more undefined references to `cuDeviceGetAttribute' follow
collect2: ld returned 1 exit status
make[2]: *** [../../bin/linux/release/deviceQueryDrv] Error 1
make[2]: Leaving directory `/home/john/NVIDIA_GPU_Computing_SDK/C/src/deviceQueryDrv'
make[1]: *** [src/deviceQueryDrv/Makefile.ph_build] Error 2
make[1]: Leaving directory `/home/john/NVIDIA_GPU_Computing_SDK/C'
make: *** [all] Error 2



I would appreciate any help that anyone can provide me with. If I can provide any further information please let me know.



Thanks.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...