Error in compiling: ubuntu 9.04; 64 bit sys cannot find -lcufft

I find the following error when i compile:

[codebox]/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcufft.so when searching for -lcufft

/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/libcufft.so when searching for -lcufft

/usr/bin/ld: cannot find -lcufft

collect2: ld returned 1 exit status

make: *** [modelV3.1_evolve_smaller_particles] Error 1

[/codebox]

Whats the fix? I have ubuntu 9.04 on a 64 bit system. I have the paths set up:

/usr/local/cuda/bin$

and for the LD_LIBRARY

/usr/local/cuda/lib64

this is how i got it set on .bashrc you can copy paste it. but i think you error ocurrs beacuse you wrote LD_LIBRARY instead of LD_LIBRARY_PATH

#PATH export
export PATH=/usr/local/cuda/bin:“${PATH}”

#LD_LYBRARY_PATH export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib:/usr/local/cuda/lib64:/usr/lib
export LD_LIBRARY_PATH

Thanks, but I do already have it right (I was just lazy to type it all in previous post). This is what the relevant parts of my .bashrc looks like:

export PATH=$PATH:/usr/local/cuda/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64

I have ubuntu 8.04 on other systems with cuda 2.2 and it works fine. This one is with ubuntu 9.04 and cuda 2.3.

I did copy paste above as well, just in case! I still find the same problem :(

-lcufft failure is building/linking error. Not running, so it is not related to LD_LIBRARY… yet.

it is about searching link directory. In your case, it went to find it incompatible in /usr/local/cuda/lib, not /usr/local/cuda/lib64

you need to look at common.mk, make sure LIB to include lib64 instead of lib. export verbose=1, to see whether there is -L/usr/local/cuda/lib64 in linking step.

Thanks ! Your post helped me figure out the problem. It was just that I was using make file that was first built for cuda 2.2 . But few thigns have changed in 2.3 and I needed to make those changes in terms of linking to lib64 instead of lib. cheers.