Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing cuda 5 samples in Ubuntu 12.10

I'm trying to install cuda 5 samples:

Driver:   Not Selected
Toolkit:  Not Selected
Samples:  Installation Failed. Missing required libraries.

But I got this error:

Missing required library libglut.so

But:

frederico@zeus:~/Downloads$ sudo find / -name libglut.so*
/usr/lib/libglut.so
/usr/lib32/nvidia-current/libglut.so

Where nvidia installer is looking for? maybe /usr/lib64? There is no /usr/lib64 on Ubuntu 12.10:

frederico@zeus:~/Downloads$ ls /usr
bin  games  include  lib  lib32  local  sbin  share  src

frederico@zeus:~/Downloads$ uname -a
Linux zeus 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
like image 288
Frederico Schardong Avatar asked Oct 20 '12 08:10

Frederico Schardong


2 Answers

I am also running Ubuntu 12.10 and I found this library in folder /usr/lib/x86_64-linux-gnu/ after installing freeglut3 package.

I also make a softlink and I have been able to install CUDA 5.0 examples:

ln -s /usr/lib/x86_64-linux-gnu/libglut.so.3 /usr/lib/libglut.so

I have not checked if the samples can be compiled yet.

like image 133
rpardo Avatar answered Nov 07 '22 08:11

rpardo


I got CUDA-5.0 to work very fine on Ubuntu 12.10. It built the samples. I was also able to compile OpenCV-2.4.4 with Cuda support, than ffmpeg with libopencv support speeding the editing and encoding of Videos up to 8x.

I've done this:

  1. sudo apt-get install linux-headers-3.5.0-26 freeglut3-dev mpich-dev gcc-4.6 g++-4.6
  2. Don't install the nvidia-driver from the ubuntu repository!, download the latest Driver from nvidia.com and do: chmod +x (Downloadpath)/*run than sudo lightdm stop than cd (Downloadpath) than sudo ./NV*run than sudo restart
  3. download the ubuntu-11X-version of cuda-5.0 from nvidia.com and install it (sudo ./*run) without the offered dev-driver, answer the question about install-Path with " /opt/cuda-5.0
  4. the default version of gcc in ubuntu 12.10 (gcc-4.7) conflicts with the Cuda-Code. so let cuda use the perv. gcc-version: sudo ln -s /usr/bin/gcc-4.6 /opt/cuda-5.0/bin/gcc
  5. let ldconf know about the cuda-libs: echo '/opt/cuda-5.0/lib64' > /etc/ld.so.conf.d/nvidia-cuda.conf && echo '/opt/cuda-5.0/lib' >> /etc/ld.so.conf.d/nvidia-cuda.conf than do: sudo ldconfig
  6. Many programs search for the (nvidia)-OpenCL-Include-Files in /usr/include. But they are not there, so link to them: sudo ln -s /opt/cuda-5.0/include/CL /usr/include/CL and sudo ln -s /opt/cuda-5.0/include/CL /usr/include/OpenCL
  7. Cuda can build the sample now. But if you want to compile Program-Sourcecode e.g. OpenCV you need to change temorarily the symbolic links in order to point at gcc-4.6 and g++-4.6: sudo ln -s /usr/bin/gcc-4.6 /usr/bin/gcc - sudo ln -s /usr/bin/g++-4.6 /usr/bin/g++ - sudo ln -s /usr/bin/g++-4.6 /usr/bin/c++
  8. In order to avoid version-conflicts try to compile all other dependent Packages with those symlinks (e.g. OpenCV+ffmpeg+frei0r-plugins)
    1. After compiling: Don't forget to correct the gcc and g++ symlinks to point at Version 4.7!!
like image 43
Omar Ataya Avatar answered Nov 07 '22 08:11

Omar Ataya