0
votes

After looking at installing CUDA 5.0 on my new Fedora19 system, I found that CUDA 5.5 was a better candidate, as it came in an rpm format. I followed the directions for installation found here, and everything was going great until I attempt to compile the samples. First off, it installs the samples to /usr/local/cuda/samples, and I had to make sure that my LD_LIBRARY_PATH included /usr/local/cuda/lib (not just the 5.5 version), but then I get the following two errors when I attempt to run the 'make all' command.

../../common/inc/exception.h: In constructor ‘Exception<Std_Exception>::Exception()’:
../../common/inc/exception.h:129:94: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
Exception<Std_Exception>::Exception() :

I thought that C++11 was the default version? And then when I get to trying to compile the matrixMulDrv, I get the following error that really makes no sense:

/usr/local/cuda-5.5/bin/nvcc -ccbin g++   -m64        -o matrixMulDrv matrixMulDrv.o  -L/usr/lib64/nvidia -lcuda
/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status

I was wondering if anybody else had any problems of this nature. I had moved to 5.5 so that I could use the current gcc compilers (4.8.1). When I look in /usr/lib64/nvidia, I see all of the files I supposedly need, including libcuda.so.1. Has anybody else seen this?

3
Try "-std=c++11" if it tells you todoctorlove
I will. I need to find where it controls the overall flags and overwrite that particular flag.NuclearAlchemist

3 Answers

1
votes

Fedora 18 with GCC 4.7.2/GLIBC 2.16 is an officially supported distro for CUDA 5.5 RC. Fedora 19 is not, nor is there any indication of support for GCC 4.8.x. I'm not surprised you're having trouble. The libcuda.so you see in /usr/lib64/nvidia was linked against a different version of GLIBC (2.16) than the one that is most likely on your machine (2.17).

The only way forward with Fedora 19 that I can imagine would be to downgrade your (i.e. install an alternate) GCC/GLIBC to the one that comes with Fedora 18. It might be easier just to switch to Fedora 18.

2
votes

Regarding the first issue:

../../common/inc/exception.h: In constructor ‘Exception<Std_Exception>::Exception()’:
../../common/inc/exception.h:129:94: warning: delegating constructors only available with -std=c++11 or -std=gnu++11 [enabled by default]
Exception<Std_Exception>::Exception() :

These messages are only warnings, so compilation should still continue without problems.

Regarding the second issue:

/bin/ld: cannot find -lcuda
collect2: error: ld returned 1 exit status

have a look in /usr/lib64/nvidia and ensure that libcuda.so and libcuda.so.1 symlinks both exist and point to libcuda.so.[your driver version].

In my installation, the /usr/lib64/nvidia/libcuda.so symlink was not created, for whatever reason. If yours is also missing, then type (as root):

ln -s /usr/lib64/nvidia/libcuda.so.VERSION /usr/lib64/nvidia/libcuda.so

replacing VERSION with the version number of your nvidia driver (for example libcuda.so.319.32).

Does this solve your problem?

0
votes

CUDA is highly specific to the Linux kernel version. For example, CUDA 6.5 is only guaranteed to work with Fedora 20 kernel 3.12.

# Install kernel 3.16.2
sudo yum -y install https://kojipkgs.fedoraproject.org/packages/kernel/3.16.2/201.fc20/x86_64/kernel-3.16.2-201.fc20.x86_64.rpm
sudo yum -y install https://kojipkgs.fedoraproject.org/packages/kernel/3.16.2/201.fc20/x86_64/kernel-devel-3.16.2-201.fc20.x86_64.rpm
sudo yum -y install libvdpau-devel
sudo reboot

# Install cuda 6.5
wget http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.14_linux_64.run
sudo bash cuda_6.5.14_linux_64.run --override

It can be helpful to downgrade your kernel to match the version specified in the CUDA System Requirements.