cublas and gcc 4.1 gives cuda/lib/ 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

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

gcc -shared -o /home/dohashi/sandbox/main/2/internal/bin.X86_64_LINUX/ -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/ file not recognized: File format not recognized
collect2: ld returned 1 exit status
make: *** [/home/dohashi/sandbox/main/2/internal/bin.X86_64_LINUX/] Error 1

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



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

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 #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/

/home/dohashi/cuda/lib/ 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.


Any more ideas on how to resolve this problem?



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

There is no /etc/selinux on this machine.


same problem here.

Suse Linux ES 10 SP2

CUDA 2.2