Building the SDK 4.1 /usr/bin/ld: cannot find -lcuda
I can build the first few code samples, but it dies when I get to deviceQuery.
As far as I can tell, there is a cuda library missing. True?
I'm not finding any libcuda.so file. Should there be one?
Do I need to build it, or should it have been installed?

Could someone give me some guidance?

The details:

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/cuda/bin

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ echo $LD_LIBRARY_PATH
/usr/local/cuda/lib64:/usr/local/cuda/lib:

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ gcc --version
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.20 Mon Feb 6 21:07:30 PST 2012
GCC version: gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ uname -m && cat /etc/*release
x86_64
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ make
/usr/bin/ld: cannot find -lcuda
collect2: ld returned 1 exit status
make: *** [../../bin/linux/release/deviceQuery] Error 1
I can build the first few code samples, but it dies when I get to deviceQuery.

As far as I can tell, there is a cuda library missing. True?

I'm not finding any libcuda.so file. Should there be one?

Do I need to build it, or should it have been installed?



Could someone give me some guidance?



The details:



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ echo $PATH

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/cuda/bin



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ echo $LD_LIBRARY_PATH

/usr/local/cuda/lib64:/usr/local/cuda/lib:



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ gcc --version

gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2

Copyright (C) 2010 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ cat /proc/driver/nvidia/version

NVRM version: NVIDIA UNIX x86_64 Kernel Module 295.20 Mon Feb 6 21:07:30 PST 2012

GCC version: gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu4)



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ uname -m && cat /etc/*release

x86_64

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=11.04

DISTRIB_CODENAME=natty

DISTRIB_DESCRIPTION="Ubuntu 11.04"



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C/src/deviceQuery$ make

/usr/bin/ld: cannot find -lcuda

collect2: ld returned 1 exit status

make: *** [../../bin/linux/release/deviceQuery] Error 1

#1
Posted 03/09/2012 06:31 PM   
The last line of the make file is generating the error:


# Add source files here
EXECUTABLE := deviceQuery
# Cuda source files (compiled with cudacc)
CUFILES :=
# C/C++ source files (compiled with gcc / c++)
CCFILES := deviceQuery.cpp

# Do not link with CUTIL
OMIT_CUTIL_LIB := 1

################################################################################
# Rules and targets

include ../../common/common.mk

LIB += -lcuda
The last line of the make file is generating the error:





# Add source files here

EXECUTABLE := deviceQuery

# Cuda source files (compiled with cudacc)

CUFILES :=

# C/C++ source files (compiled with gcc / c++)

CCFILES := deviceQuery.cpp



# Do not link with CUTIL

OMIT_CUTIL_LIB := 1



################################################################################

# Rules and targets



include ../../common/common.mk



LIB += -lcuda

#2
Posted 03/09/2012 11:54 PM   
Are the warnings in this of any concern?

rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C$ ldconfig -v | grep cuda
[b]/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once[/b]
/usr/local/cuda/lib64:
libcudart.so.4 -> libcudart.so.4.1.28
/usr/local/cuda/lib:
libcudart.so.4 -> libcudart.so.4.1.28
[b] libcuda.so.1 -> libcuda.so.295.20
libcuda.so.1 -> libcuda.so.295.20[/b]
libicudata.so.44 -> libicudata.so.44.2
Are the warnings in this of any concern?



rrob@ubuntu:~/NVIDIA_GPU_Computing_SDK/C$ ldconfig -v | grep cuda

/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once

/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once


/usr/local/cuda/lib64:

libcudart.so.4 -> libcudart.so.4.1.28

/usr/local/cuda/lib:

libcudart.so.4 -> libcudart.so.4.1.28

libcuda.so.1 -> libcuda.so.295.20

libcuda.so.1 -> libcuda.so.295.20


libicudata.so.44 -> libicudata.so.44.2

#3
Posted 03/09/2012 11:57 PM   
http://forums.nvidia.com/index.php?showtopic=224718

#4
Posted 04/09/2012 05:40 PM   
Scroll To Top