Mikhail
Mikhail

Reputation: 8038

libcudart and local build of gcc link against wrong glibc

I am trying to get CUDA5 to work on a shared cluster.

When I invoke the local gcc to build large applications it works just fine. When I use the CUDA wrapper I get an error saying that it can't find certain parts of glib.

Why is CUDA looking at /lib64/libc.so.6, if I specified the local gcc library directory?

[uid002@n001 cuda5test]$ ldd /home/ex/uid002/cuda/lib64/libcudart.so
/home/ex/uid002/cuda/lib64/libcudart.so: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/ex/uid002/cuda/lib64/libcudart.so)
    linux-vdso.so.1 =>  (0x00007fff277ff000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f5328da6000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5328b89000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f5328981000)
    libstdc++.so.6 => /home/ex/uid002/gcc/lib64/libstdc++.so.6 (0x00007f532867d000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f53283f8000)
    libgcc_s.so.1 => /home/ex/uid002/gcc/lib64/libgcc_s.so.1 (0x00007f53281e3000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f5327e67000)
    /lib64/ld-linux-x86-64.so.2 (0x000000335ae00000)

And

[uid002@n001 cuda5test]$ echo $LD_LIBRARY_PATH
/home/ex/uid002/cuda/lib64:/home/ex/uid002/gmp/lib:/home/ex/uid002/mpfr/lib:/home/ex/uid002/mpc/lib:/home/ex/uid002/gcc/lib64

I have tried to reinstall the CUDA package, and this was no help.

Upvotes: 0

Views: 550

Answers (1)

Employed Russian
Employed Russian

Reputation: 213829

libcudart.so: /lib64/libc.so.6: version `GLIBC_2.14' not found

This error means that the libcudart.so library was linked on a system with glibc-2.14 or later. You can only use that library if your system (both at link time and at runtime) has glibc version >= 2.14. Your system does not satisfy prerequisite for libcudart.so. You'll have to use older version of libcudart.so, or upgrade your system.

(Be careful: upgrading glibc incorrectly is a sure way to render the system un-bootable.)

Why is CUDA looking at /lib64/libc.so.6, if I specified the local gcc library directory?

Glibc is not part of GCC distribution, and is completely independent. "local gcc library directory" is unlikely to have libc.so in it.

Upvotes: 2

Related Questions