I am trying to install CUDA 5.0 on Ubuntu 12.04 for parallel programming. I need to use NVCC cross compilation feature, therefore, after installing CUDA 5.0 (add to path successfully also), I am having errors when using NVCC cross compilation.
This is the command I want to run:
nvcc -gencode arch=compute_20,code=sm_20 -Xptxas -v test.cu -o test -DLINUX -DIA32 -target-cpu-arch=ARM -ccbin=/usr/bin/arm-linux-gnueabihf-g++-4.6 -m32 -O3 -Xcompiler -fopenmp -I/usr/local/include -L/usr/local/lib -I/usr/include/thrust -ludt -lstdc++ -lpthread -lm -L/usr/local/cuda-5.0/lib -L/usr/local/cuda-5.0/lib -I/usr/local/cuda-5.0/include -I/usr/local/cuda-5.0/include
Initially, it fails with this error message:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function '_Z5helloPcPi' for 'sm_20'
ptxas info : Function properties for _Z5helloPcPi
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 5 registers, 40 bytes cemm[0]
/usr/lib/gcc/arm-linux-gnueabifh/4.6/../../../../arm-linux-gnueabifh/bin/ld:can not find -ludt
collect2: ld returned 1 exit status
Then one of my friend told me, this error message means I need to install udt, so I tried installing udt.
sudo apt-get install libudt-dev
It did solve this error, however, a new error appears:
ptxas info : 0 bytes gmem
ptxas info : Compiling entry function '_Z5helloPcPi' for 'sm_20'
ptxas info : Function properties for _Z5helloPcPi
0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads
ptxas info : Used 5 registers, 40 bytes cmem[0]
/usr/lib/libudt.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
I searched online, some people suggest that I should update my GCC and G++, I did that, not working.
For more information, this are the libraries I have installed (system path are added):
gcc, g++, cuda 5.0, ia32-libs, libudt-dev, freeglut3-dev, build-essential, libx11-dev, libxmu-dev, libxi-dev, libgl1-mesa-glx,libglu1-mesa,libglu1-mesa-dev
This question may be duplicated with this, but actually i am having a different problem here.
Hope you can share with me your solutions to this problem, I will really appreciate that because I have suffered for days.