installation - /usr/local/cuda-5.0/lib64/libcusparse.so: undefined reference to `std::bad_alloc::what() const@GLIBCXX_3.4.9 -


i setting cuda 5.0 on centos 6.2, have set successfully, because command querydevice , got passed. when enter /root/nvidia_cuda-5.0_samples, , make project,i got errors below:

make[1]: entering directory `/root/nvidia_cuda-5.0_samples/7_cudalibraries/conjugategradientprecond' g++ -m64  -i/usr/local/cuda-5.0/include -i. -i.. -i../../common/inc -o main.o -c main.cpp g++ -m64 -o conjugategradientprecond main.o -l/usr/local/cuda-5.0/lib64 -lcudart -lcublas -lcusparse  /usr/local/cuda-5.0/lib64/libcusparse.so: undefined reference `std::bad_alloc::what() const@glibcxx_3.4.9' collect2: ld returned 1 exit status make[1]: *** [conjugategradientprecond] error 1 

my compiler gcc44, got below steps:

1.sudo rm gcc 2.sudo ln -s /usr/bin/gcc-4.4 gcc 

before upper operation of 1 , 2, compiler gcc 4.1.7,i got errors title, operation of 1 , 2, there error either

centos 6.2 ships version 4.4.6 of gcc. niether 4.1.7 nor 4.4 correct compilers distro. i'm not saying can't made work somehow, you'll have better results compiler ships distro. (you may have messed compiler installation.)

since libcusparse.so delivered in binary form toolkit, tailored particular set of libraries associated compiler (glibc). if change these due compiler change, you're going have trouble.

the solution use compiler packages (gcc, g++) ship distro.

edit: in response question below, have "clean" centos6.2 install.

when run:

strings /usr/lib64/libstdc++.so.6 |grep glibc  

i get:

$ strings /usr/lib64/libstdc++.so.6 |grep glibc glibcxx_3.4 glibcxx_3.4.1 glibcxx_3.4.2 glibcxx_3.4.3 glibcxx_3.4.4 glibcxx_3.4.5 glibcxx_3.4.6 glibcxx_3.4.7 glibcxx_3.4.8 glibcxx_3.4.9 glibcxx_3.4.10 glibcxx_3.4.11 glibcxx_3.4.12 glibcxx_3.4.13 glibc_2.2.5 glibc_2.3 glibc_2.4 glibc_2.3.2 glibcxx_force_new glibcxx_debug_message_length $ 

and can see glibcxx_3.4.9 in there. think have messed install.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -