Installing cuda 5 samples in Ubuntu 12.10

16,587

Solution 1

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.

Solution 2

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!!

Solution 3

CUDA 5 is not yet supported on Ubuntu 12. For reference see CUDA 5.0 Toolkit Release Notes And Errata

**  Distributions Currently Supported  

    Distribution       32 64  Kernel                 GCC         GLIBC        
    -----------------  -- --  ---------------------  ----------  -------------
    Fedora 16          X  X   3.1.0-7.fc16           4.6.2       2.14.90      
    ICC Compiler 12.1     X                                                   
    OpenSUSE 12.1         X   3.1.0-1.2-desktop      4.6.2       2.14.1       
    Red Hat RHEL 6.x      X   2.6.32-131.0.15.el6    4.4.5       2.12         
    Red Hat RHEL 5.5+     X   2.6.18-238.el5         4.1.2       2.5          
    SUSE SLES 11 SP2      X   3.0.13-0.27-pae        4.3.4       2.11.3       
    SUSE SLES 11.1     X  X   2.6.32.12-0.7-pae      4.3.4       2.11.1       
    Ubuntu 11.10       X  X   3.0.0-19-generic-pae   4.6.1       2.13         
    Ubuntu 10.04       X  X   2.6.35-23-generic      4.4.5       2.12.1    
Share:
16,587

Related videos on Youtube

Frederico Schardong
Author by

Frederico Schardong

Updated on September 18, 2022

Comments

  • Frederico Schardong
    Frederico Schardong about 1 year

    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
    
  • Frederico Schardong
    Frederico Schardong about 11 years
    I could not install the samples but could compile my projects, so I'm ok. Thank you!
  • rpardo
    rpardo about 11 years
    You're welcome, I have compiled many samples. However, I have not been able to compile whole set. I think that it could be because of some particular libraries that are used in samples.
  • Frederico Schardong
    Frederico Schardong about 11 years
    have you ever used nsight to debug some cuda code? I just posted a question about this: stackoverflow.com/questions/12991271/…
  • Yohann
    Yohann about 11 years
    Indeed...
  • Framester
    Framester about 11 years
    @rpardo I had also problems but only with the simpleMPI one, which I just deleted.
  • serbaut
    serbaut about 11 years
    Installing freeglut and softlinking libglut.so worked on centos 6 too.
  • jtpereyda
    jtpereyda almost 11 years
    Running 32-bit Ubuntu, sudo ln -s /usr/lib/i386-linux-gnu/libglut.so.3 /usr/lib/libglut.so worked for me
  • Alexis Wilke
    Alexis Wilke almost 11 years
    The selection between 32 and 64 bit libraries is not done like that anymore. Instead there are two sub-directories under /usr/lib/... one of which is mentioned in an earlier answer: x86_64-linux-gnu
  • jrr
    jrr over 10 years
    Additionally, I was able to get through the installer by changing my /usr/bin/gcc and /usr/bin/g++ symlinks from gcc-4.7 to gcc-4.6.
  • Frederico Schardong
    Frederico Schardong over 10 years
    didn't try it but awesome contribution!