1

When I try to directly install the binary (700mb) cuda_5.0.35_linux_64_fedora16-1.run I only get the driver installed and setup detect that I have unsupported gcc version 4.7. I have nvcc and gcc-4.5.2 on my path.

Thus I configured and installed gcc 4.5.2 to another directory (/opt/gcc) and pointed it via install script :

./cudatoolkit* --compiler-bindir /opt/gcc-4.5.2/usr/bin

I only got the deviceQuery working but for other codes in samples I have this ;

gcc: error trying to exec 'cc1plus': execvp: No such file or directory

Thus the question is reduced to ;

CUDA 5.0 prod. release supports up to gcc 4.5 and I have 4.7 in stock by default. What is the proper (de facto) way of installing the secondary gcc to a different location and pointing to it from cudatoolkit install package ? Goal is to (obviously) seamless compile the samples folder in the latest CUDA release.

Older versions worked fine but I want to make this work. Any suggestions are welcomed.

y33t
  • 649
  • 4
  • 14
  • 23
  • 1
    You do have g++ 4.5 installed, don't you? The error is an internal gcc one from not finding the C++ front end. – talonmies Oct 27 '12 at 07:18
  • 1
    I finally got it working ; 1-Install gcc-4.4.7 to a different location 2-Install CUDA 5.0 to it's default location 3-Install Samples and SDK to your home directory 4-Add gcc-4.4.7 to your path (overwrite gcc-4.7.1) 5-Add LD_LIBRARY_PATH to your path 6-Add nvcc (/usr/local/cuda-5.0/bin) to your path 7-Compile (make) samples Editing common.mk is not necessary, be sure to try gcc-4.4.7 not other versions. – y33t Oct 28 '12 at 09:48
  • @y3tt: If you got it working, post the solution as an answer to your question and accept it so that the question is marked as solved. – talonmies Oct 28 '12 at 09:49
  • I intended to write the solution but while trying a newline "enter" posted directly, sorry. It's y33t, not y3tt (: – y33t Oct 28 '12 at 09:51
  • 1
    Post it as an *answer* not a comment. Then come back tomorrow and accept that answer once the time limit passes. – talonmies Oct 28 '12 at 09:55

1 Answers1

1

The steps used to get this working were:

  1. Install gcc-4.4.7 to a different location
  2. Install CUDA 5.0 to it's default location
  3. Install Samples and SDK to your home directory
  4. Add gcc-4.4.7 to your path (overwrite gcc-4.7.1)
  5. Add LD_LIBRARY_PATH to your path
  6. Add nvcc (/usr/local/cuda-5.0/bin) to your path
  7. Compile (make) samples
talonmies
  • 70,661
  • 34
  • 192
  • 269
y33t
  • 649
  • 4
  • 14
  • 23
  • Could you please provide more detailed instructions on this such as the commands you have run for the steps. I know questions states Fedora 16 but I am wondering if it would be same for Fedora 18_x64. Thanks – ODelibalta Jul 06 '13 at 00:55
  • Commands that are run change from system to system. Main problem with installing CUDA 5.0 on a distro which is newer than 2011 (gcc4.7) is the mismatch in the gcc version. Since you can't uninstall the default gcc (tons of things rely on this) you need to install a dedicated gcc for this and point the install script to this path. It should be fine. – y33t Jul 08 '13 at 23:13