Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

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.

share|improve this answer
    
Shouldn't it be LDFLAGS='-L/usr/lib/nvidia-current' ? –  wump Aug 12 '12 at 12:55
    
It should, fixed now. –  kynan Aug 13 '12 at 15:58
add comment

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).

share|improve this answer
    
I don't see -lcuda in Makefile.TRy this to find your libcuda.so: –  user55717 May 11 '12 at 18:57
    
Have you looked at askubuntu.com/q/131506/6969 for installing CUDA? A default installation does not work properly (at least, not for me on 12.04) –  Lekensteyn May 11 '12 at 20:01
    
sorry, I left comment open and it got published.Try this to find your libcuda.so: ......@ubuntu:/usr$ locate libcuda.so => /usr/lib/nvidia-current/libcuda.so . Also, Can you please elaborate what you said before ? CUDA is already installed on machine which i got, so i don't know if its just default or not. –  user55717 May 11 '12 at 20:17
    
i haven't checked that thread as CUDA is already installed. –  user55717 May 11 '12 at 20:35
1  
I got a therad that address same problem:<a href="http:// forums.nvidia.com/… pycuda installed. I was about to try your suggestion, but that thread was a bullseye, so i didn't tried that.Lekensteyn, thanks a lot for continuous support. –  user55717 May 25 '12 at 19:31
show 12 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.