a strange error when compiling

I install the current version of CUDA (CUDA 4.1) on my computer for Ubuntu 11.04 64bit. So I used the driver proposed (version 285.05.33) 64bit and the GPU Computing SDK Downloads.
I follow the documentation I think and try to compile an easy cuda code with the instruction nvcc test.cu which returns these errors :

/usr/local/cuda/bin/…/lib64/libcudart.so: undefined reference to std::_List_node_base::_M_unhook()@GLIBCXX_3.4.14' /usr/local/cuda/bin/../lib64/libcudart.so: undefined reference to __open_2@GLIBC_2.7’
/usr/local/cuda/bin/…/lib64/libcudart.so: undefined reference to __isoc99_sscanf@GLIBC_2.7' /usr/local/cuda/bin/../lib64/libcudart.so: undefined reference to std::_List_node_base::_M_hook(std::_List_node_base*)@GLIBCXX_3.4.14
collect2: ld returned 1 exit status

I tried something, I replace libcudart.so by the one of an older version (CUDA 2.0) and then it compiles correctly, I don’t understand why. How can I use CUDA 4.1 please ?

Hello I had the same problem on my Debian

take a look at my old thread

I hope it will be helpful


Hi, thank you, it compiles correctly now even if I would prefer keeping the cuda toolkit for the current version of ubuntu.
I’ve another problem now but I will take a look before asking for it.
Thank you !