CUDA 5.0 on a Slackware64 current with gcc 4.7
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.
Solution
The steps used to get this working were:
- Install gcc-4.4.7 to a different location
- Install CUDA 5.0 to it's default location
- Install Samples and SDK to your home directory
- Add gcc-4.4.7 to your path (overwrite gcc-4.7.1)
- Add LD_LIBRARY_PATH to your path
- Add nvcc (/usr/local/cuda-5.0/bin) to your path
- Compile (make) samples