Gcc versions later than 7 are not supported by CUDA 10 - Qt Error in Arch Linux

user3230539 picture user3230539 · Nov 16, 2018 · Viewed 9.4k times · Source

I am running Arch Linux and trying to build a project in Qt however, Qt spits the following error:

/opt/cuda/include/crt/host_config.h:129: error: #error -- unsupported GNU version! gcc versions later than 7 are not supported!

I have already tried a suggestion from a previous Stack Overflow post found here:

CUDA incompatible with my gcc version

I did not use the exact command as my cuda is located in /opt/cuda/bin/gcc. I did the same command for g++. However, the terminal outputs that these files are already linked. I did confirm this by going to the actual file and looking at it's properties.

Can someone please suggest a solution to my issue?

Answer

Mohammed Housseyn Taleb picture Mohammed Housseyn Taleb · May 8, 2020

I managed to do so usung this two lines, this will update the symbolic links of cuda to gcc7

ln -s /usr/bin/gcc-7 /usr/local/cuda/bin/gcc
ln -s /usr/bin/g++-7 /usr/local/cuda/bin/g++