cublas and gcc 4.1 gives cuda/lib/libcublas.so: file not recognized: File format not recognized

I am trying to build a shared library that links against cublas. The machine that I am trying to build on has the toolkit installed, but it does not have a CUDA capable card on it (I will be running on a different machine). The build machine is SUSE 11.0, the compiler is gcc 4.1 and ld version 2.16.91.0.5

I can compile the object files ok, but linking against libcublas.so gives this error:

gcc -shared -o /home/dohashi/sandbox/main/2/internal/bin.X86_64_LINUX/libmplcuda.so -L/home/dohashi/sandbox/main/2/internal/bin.X86_64_LINUX /home/dohashi/sandbox/main/2/internal/obj.X86_64_LINUX/mplcuda/dgemm.o /home/dohashi/sandbox/main/2/internal/obj.X86_64_LINUX/mplcuda/getprops.o -L/home/dohashi/cuda/lib -lcublas
/home/dohashi/cuda/lib/libcublas.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/home/dohashi/sandbox/main/2/internal/bin.X86_64_LINUX/libmplcuda.so] Error 1

This does seem to work on other machines. Is there a conflict with the gcc/ld versions I am trying to use?

Thanks

Darin

Probably a mismatch 32/64 bit.
What is the output of “file /home/dohashi/cuda/lib/libcublas.so”?

I am building on x86 64, and I think I am using the correct version of everything.

rdsumegalon:~/sandbox/main/2/mytest/x86_64> uname -a

Linux rdsumegalon 2.6.16.54-0.2.5-smp #1 SMP Mon Jan 21 13:29:51 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux

rdsumegalon:~/sandbox/main/2/mytest/x86_64> file /home/dohashi/cuda/lib/libcublas.so.2.1

/home/dohashi/cuda/lib/libcublas.so.2.1: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), stripped

Do you have SELinux enabled?
If yes, try to disable it.

I don’t think we have SELinux enabled.

Darin

Any more ideas on how to resolve this problem?

Thanks

Darin

What is the output of “cat /etc/selinux/config”?

There is no /etc/selinux on this machine.

Darin

same problem here.

Suse Linux ES 10 SP2

CUDA 2.2