Question

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.

Was it helpful?

Solution

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top