cuDriverGetVersion compiling error

9.04 ubuntu 64 bit. CUDA 2.3 GeForce 8800 GTX. using driver version 180.44 (restricted install from ubuntu repos)

I can nearly compile the sdk examples. The only remaining error is ::

make[1]: Entering directory `/media/z/code/CUDA/C/src/deviceQueryDrv'

obj/release/deviceQueryDrv.cpp.o: In function `main':

deviceQueryDrv.cpp:(.text+0x134): undefined reference to `cuDriverGetVersion'

collect2: ld returned 1 exit status

Anyone else been able to overcome this??

Also, I tried to install the latest driver from nvidia’s web site, but was unable to get the X server to start, which is why I reverted back to the restricted driver.

Are you sure that you have set the enviroment variable LD_LIBRARY_PATH?

I forgot the ask if you already intall the toolkit.

Yes, I have installed the toolkit at /usr/local/cuda.

Setting LD_LIBRARY_PATH = /usr/local/cuda/lib or /usr/local/cuda/lib64 does not resolve the problem.

However, if I hide the makefile for the directory CUDA/C/src/deviceQueryDrv the compilation will complete successfully, however any of the example program I wish to run will segmentation fault. gdb indicates that the segfault is ocuring at calls similar to the following snippet:

) ]$ gdb ./bin/linux/release/clock

GNU gdb 6.8-debian

Copyright (C) 2008 Free Software Foundation, Inc.

License GPLv3+: GNU GPL version 3 or later <>

This is free software: you are free to change and redistribute it.

There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.

This GDB was configured as "x86_64-linux-gnu"...

(gdb) run

Starting program: /media/z/code/CUDA/C/bin/linux/release/clock 

[Thread debugging using libthread_db enabled]

[New Thread 0x7f1241268700 (LWP 30520)]

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x7f1241268700 (LWP 30520)]

0x00007f123f86a070 in ?? ()

(gdb) where

#0  0x00007f123f86a070 in ?? ()

#1  0x00007f1240e5d124 in ?? () from /usr/local/cuda/lib64/

#2  0x00007f1240e46bef in cudaGetDeviceProperties () from /usr/local/cuda/lib64/

#3  0x00000000004040f5 in main ()

I don’t know if there’s any incompatibility from ubuntu 9.04 with the CUDA 2.3. Try to use the CUDA 2.2. I use this version here with ubuntu 9.04 64bits without problems.

I’m having the same problem here, some one know how to solve it?

gcc and g++ are version 4.3.3

Found the problem, the thing is that the default NVIDIA driver distributed in the ubuntu repo… that is the 180.xxxx is to outdated for this, you need to disable it on restricted drivers… and I have removed all the nvidia installed files with synaptic, after that, installed the “OpenGL version string: 3.1.0 NVIDIA 190.18” and that is… at less they compile, now lets see if they run… OK, they run.

By the way… I remember why I “LOVE” ubuntu repos for NVIDIA drivers… bad that the major parth of the users dont complain about the default drivers…