[390.48] Installation error CONFIG_RETPOLINE=y error on CentOS 7

I am installing the 390.48 driver onto Centos 7.

I downloaded and run the bash command.

bash NVIDIA-Linux-x86_64-390.48.run

This is the error using either gcc-7.3 or gcc4.5.8

make[1]: Entering directory `/usr/src/kernels/3.10.0-693.21.1.el7.x86_64’
/usr/src/kernels/3.10.0-693.21.1.el7.x86_64/arch/x86/Makefile:166: *** CONFIG_RETPOLINE=y, but not supported by the compiler. Toolchain update recommended… Stop.

I them downloaded (GCC) 7.3.0, compiled and installed it and got the same error:

Any help would be appreciated?

I have only one board K620 and intend to use it partially for CUDA Cosmological Calculations


You need to upgrade to this version:
It has the needed retpoline support.

Just a follow-up. Does that means that GCC-7.3 does not have the retpoline support?


gcc 7.3 should have retpoline support but the centos kernel has been compiled with gcc 4.8.5 so compiling modules like the nvidia driver fails with gcc 7.3 due to compiler mismatch.

Thank you very much. I did not know about this requirement of compatibility. I suppose it is because the driver will become a module and part of the kernel and thus has to be compiled by the same compiler.

Now I have gcc-7.3 and the updated 4.8.5.

How can I make the installation command to use the 4.8.5 instead of the 7.3

bash NVIDIA-Linux-x86_64-390.48.run

gcc 4.8 should be standard, run
gcc --version
to check. Depends on how you installed gcc 7.3.
Check your evironment variables, especially CC
export |grep CC

yes. I install by downloading the source and compiling/installing it.

I will follow you advice and try to get GCC to point towards the right version on my .bashrc

Compiling/installing maybe wasn’t the best choice. Better run
make uninstall
in the build directory to clean your system and reinstall the system gcc.

thanks. I was about to reinstall centos…:) this has been an ordeal. Centos is very unforgiven.

make uninstall is not supported in this tree.

pushd build && for d in $(ls -d */); do sudo make -C $d uninstall; done && popd
taken from

I already am reinstalling the beast. I will keep this handy for my next mistake. Thanks a million

I reinstalled Centos-7 and downloaded the update, installed it. The gcc error is still there.

What to do?
My gcc os

You just installed the source package (.src.rpm), not the binary one so you didn’t upgrade the compiler.