Problem running helloworld sample

[Old posts from the commercial version of ArrayFire] Issues and comments for download and installation. Getting up and running.

Moderators: melonakos, pavanky

Problem running helloworld sample

Postby anusk25 » Thu Nov 07, 2013 12:14 am


I am trying to verify if array fire installed correctly on my Linux 64 bit machine(ubuntu 12.04). I tried doing make cuda ./helloworld_cuda inside the helloworld folder and got the following error

Code: Select all
cc -m64 -Wall -Werror -I../../include -pthread -O2 -DNDEBUG -I/usr/local/cuda/include -lrt -Wl,--no-as-needed -L../../lib64 -lpthread -lstdc++ -lm -Wl,-rpath,../../lib64,-rpath,/opt/arrayfire-2.0/lib64 -lafcu  -L/usr/local/cuda/lib64 -lcuda -lcudart -lcurand -lcusparse -Wl,-rpath,/usr/local/cuda/lib64 helloworld.cpp -o helloworld_cuda
/usr/bin/ld: cannot find -lcuda
collect2: ld returned 1 exit status
make: *** [helloworld_cuda] Error 1

I tried editing my .bahrc file and added the following to it
Code: Select all
if [ -z $LD_LIBRARY_PATH ]; then

but it still didn't do anything. I looked at the lib64 folder inside the cuda directory and it contains none of these libraries -lcuda -lcudart -lcurand -lcusparse. Instead it has different names of the same libraries such as libcudart, libcurand, libcusparse. Does anyone have any suggestions of how to fix this problem?
Posts: 1
Joined: Wed Nov 06, 2013 11:54 pm

Re: Problem running helloworld sample

Postby pavanky » Fri Nov 08, 2013 1:50 am


The compilation process is not able to find This is installed when you install the nvidia driver. Please try running "locate" to find out where it is. If there is no output try running "sudo updatedb" and then try "locate" again.

If you find, but it is not in the usual system library locations, try adding a symlink like the following.

Code: Select all
sudo ln -s /path/to/ /usr/local/cuda/lib64/
Pavan Yalamanchili,
~ If it is not broken, you have not tried hard enough ~
User avatar
Site Admin
Posts: 1123
Joined: Mon Mar 15, 2010 7:39 pm
Location: Atlanta, GA

Return to [archive-commercial] Download & Installation