I have installed CUDA 5.0 and NVCC on my Ubuntu virtual machine and have had problems compiling even a basic CUDA C program. The error is as follows:
user@ubuntu:~/CUDA$ nvcc helloworld.cu -o helloworld.o -target-cpu-arch=ARM -ccbin=/usr/bin/arm-linux-gnueabi-gcc-4.6 --machine=32
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/local/cuda-5.0/bin/../lib/libcudart.so when searching for -lcudart
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libcudart.so when searching for -lcudart
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lcudart
collect2: ld returned 1 exit status
I have tried to research this problem and came across this link: skipping incompatible libcudart.so when searching for -lcudart
And so I followed the advice that was offered on that link and added
/usr/local/cuda-5.0/lib64
and
/usr/local/cuda-5.0/lib
to my LD_LIBRARY_PATH environment variable and now this is the result of the
user@ubuntu:~/CUDA$ echo $LD_LIBRARY_PATH
/usr/local/cuda-5.0/lib:/usr/local/cuda-5.0/lib64
user@ubuntu:~/CUDA$
However, the problem still persists, please help.
It turns out that the CUDA installer I was using from NVIDIA will not allow me to cross compile for my CARMA board, but it has to be downloaded from the manufacturer SECO.