0

I am installing pycuda2011.2.2 on ubuntu 11.10, but can't complete it. Cuda is 4.0. When I do:

$ make -j 4 

I get this error:

/usr/bin/ld: cannot find -lcuda 
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcurand.so when searching for -lcurand

Why this error? I think that cuda is 32 bit on 64 bit machine. But I can't see whether it's 32 bit or 64 bit.

Also, can anyone share code to make "gcc 4.4" as priority, just for my account and not all account?

jokerdino
  • 41,732

2 Answers2

1

I don't understand why you would want to run make at all when building pycuda - it does not even have a Makefile (apart from the documentation).

You install pycuda by running ./configure.py with the appropriate options followed by LDFLAGS=-L/usr/lib/nvidia-current python setup.py install.

You need to set the LDFLAGS environment variable so that the pycuda setup can find libcuda.so, which on ubuntu systems is in a non-standard location (/usr/lib/nvidia-current).

If you're really asking about compiling the CUDA SDK (in which case you should definitely edit your question!), see my response on the NVIDIA forums.

kynan
  • 2,235
0

What about removing -lcuda from the Makefile? Last time I checked the toolkit and sdk, I could not find a libcuda.so file.

There have also been changes in the strictness of the compiler, so -lcuda must come after object files and other libraries which depend on it. You likely have to move -lcuda to the end of the $(CC) line (or whatever compiler command is used).

Lekensteyn
  • 178,446