Ask Your Question

How to install or compile GCC 7.3 for CUDA 10 in Fedora 29?

asked 2018-11-08 15:54:01 -0600

Zogi gravatar image

Since Fedora 28, the OS install GCC 8.X version. How can I install or compile GCC 7.3 in Fedora 29? I got such an error after trying to compile an open source project:

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

I've read this GCC documentation However, I still cannot understand everything.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2018-11-08 17:53:18 -0600

ed209 gravatar image

Try installing older gcc version with

dnf install gcc-compat*
edit flag offensive delete link more

answered 2018-11-11 06:28:59 -0600

Modus gravatar image

You can use the newer gcc v8.X, by passing the —override option to the .run file (assuming you downloaded the .run file for CUDA installation from the NVIDIA website). Otherwise if you have already installed as pointed in the other answer you can gcc-compat* to install the older version of gcc.

edit flag offensive delete link more


Just out of curiosity, are you sure cuda will eventually compile with newest gcc? My experience says "no way".

ed209 gravatar imageed209 ( 2018-11-11 08:32:31 -0600 )edit

I installed CUDA on my system couple of days ago, by running the .run file downloaded from NVIDIA with the flag —override and it installed it successfully and tested one of the sample apps that come with CUDA and worked fine.

Modus gravatar imageModus ( 2018-11-11 08:49:43 -0600 )edit
Modus gravatar imageModus ( 2018-11-11 08:51:00 -0600 )edit

You're talking about a beta. Moreover I would like to see something with cuda compiled by the latest gcc, not just the samples directory.

ed209 gravatar imageed209 ( 2018-11-11 13:41:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-11-08 15:54:01 -0600

Seen: 607 times

Last updated: Nov 11 '18