Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

I'm running Ubuntu 16.10 in my laptop;
I have recently downloaded Linux kernel from git, but when I am trying to compile it with a make command from the terminal.

It is giving me

"error:Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: 
-fstack-protector-strong not supported by compiler" 

What should I do to resolve this problem?

like image 471
Nadim Almas Siddiqui Avatar asked Feb 21 '26 11:02

Nadim Almas Siddiqui


1 Answers

See this thread and this answer: this error could be the result of multiple gcc versions alternatives.
See "What exactly does update-alternatives do?"

Clear them out:

$ sudo update-alternatives --remove-all gcc
$ sudo update-alternatives --remove-all g++

Then re-install them, and make sure your gcc and g++ reference the same version.

sudo update-alternatives --config gcc
sudo update-alternatives --config g++

Note (March 2017): doug65536 mentions in the comments another case:

I found a solution to the issue with my nvidia driver package.
I had installed a custom build of binutils for a gdb patch.
Forcing it to reinstall binutils resolved the issue. It makes no sense, but it worked.

like image 108
VonC Avatar answered Feb 23 '26 02:02

VonC