Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SOLVED] Kernel 4.5.1 Build Failed fstack-protector-strong-not-supported #92

Closed
jcdenton2k opened this issue Apr 17, 2016 · 3 comments
Closed

Comments

@jcdenton2k
Copy link

jcdenton2k commented Apr 17, 2016

I'm not sure which compiler/version that I need to get this to build properly. Hope it gets fixed.
I removed my username and computer name for security/privacy reasons.
I do have gcc-5 installed and ready to go but when I do --version it still shows 4.8.5 so I'm not sure what is up with that.
And yes, I did install the usual build dependencies as outlined in the readme.

make -C /lib/modules/4.5.1-040501-generic/build M=/home/*removed*/rtl8188ce-linux-driver modules
make[1]: Entering directory `/usr/src/linux-headers-4.5.1-040501-generic'
Makefile:666: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
  CC [M]  /home/*removed*/rtl8188ce-linux-driver/base.o
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make[2]: *** [/home/*removed*/rtl8188ce-linux-driver/base.o] Error 1
make[1]: *** [_module_/home/*removed*/rtl8188ce-linux-driver] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-4.5.1-040501-generic'
make: *** [all] Error 2
[*] The build has failed! Please make sure you have all dependencies installed and you are building on the correct branch (kernel version, not linux distro version, is most important for the branch)
*removed*@*removed*-PC ~ $ gcc --version
gcc (Ubuntu 4.8.5-2ubuntu1~14.04.1) 4.8.5
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*removed*@*removed*-PC ~ $ dpkg -l | grep gcc | awk '{print $2}'
gcc
gcc-4.8
gcc-4.8-base:amd64
gcc-4.8-base:i386
gcc-4.9
gcc-4.9-base:amd64
gcc-4.9-base:i386
gcc-5
gcc-5-base:amd64
gcc-5-base:i386
libgcc-4.8-dev:amd64
libgcc-4.9-dev:amd64
libgcc-5-dev:amd64
libgcc1:amd64
libgcc1:i386
*removed*@*removed*-PC ~ $ uname -r
4.5.1-040501-generic
*removed*@*removed*-PC ~ $ uname -a
Linux *removed*-PC 4.5.1-040501-generic #201604121331 SMP Tue Apr 12 17:33:29 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
@jcdenton2k
Copy link
Author

jcdenton2k commented Apr 17, 2016

Figured out a solution!
Reference: http://askubuntu.com/questions/26498/choose-gcc-and-g-version

I'll just post a list of the commands I used and the output received. If you don't receive the same output then you may have issues.

I've installed gcc and g++ versions 4.8 and 4.9 and 5
If you have earlier versions you want to keep then you'll need to adjust the priorities (the 10/20/etc) manually to account for this. The askubuntu link above has the information that I used.

As usual, for privacy/security I removed my username and computer name and just show the actual commands and output is directly underneath the command.

You want to do it in order from oldest to newest with ascending priority adding 10 priority each time (aka 10 20 30 etc) for each version.

--BEGIN--
;;Clear out old settings

$ sudo update-alternatives --remove-all gcc
$ sudo update-alternatives --remove-all g++
$ sudo update-alternatives --config gcc
update-alternatives: error: no alternatives for gcc
$ sudo update-alternatives --config g++
update-alternatives: error: no alternatives for g++

;;Create new settings
;;Change these around and adjust priority based on how many older versions you have

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
update-alternatives: using /usr/bin/gcc-4.8 to provide /usr/bin/gcc (gcc) in auto mode
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 20
update-alternatives: using /usr/bin/gcc-4.9 to provide /usr/bin/gcc (gcc) in auto mode
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 30
update-alternatives: using /usr/bin/gcc-5 to provide /usr/bin/gcc (gcc) in auto mode
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 10
update-alternatives: using /usr/bin/g++-4.8 to provide /usr/bin/g++ (g++) in auto mode
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 20
update-alternatives: using /usr/bin/g++-4.9 to provide /usr/bin/g++ (g++) in auto mode
$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 30
update-alternatives: using /usr/bin/g++-5 to provide /usr/bin/g++ (g++) in auto mode
$ sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 40
$ sudo update-alternatives --set cc /usr/bin/gcc
$ sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 40
$ sudo update-alternatives --set c++ /usr/bin/g++

;;Now to set up the new settings and verify they work

$ sudo update-alternatives --config gcc
There are 3 choices for the alternative gcc (providing /usr/bin/gcc).

  Selection    Path              Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-5     30        auto mode
  1            /usr/bin/gcc-4.8   10        manual mode
  2            /usr/bin/gcc-4.9   20        manual mode
  3            /usr/bin/gcc-5     30        manual mode

Press enter to keep the current choice[*], or type selection number: (I just hit enter)

$ sudo update-alternatives --config g++
There are 3 choices for the alternative g++ (providing /usr/bin/g++).

  Selection    Path              Priority   Status
------------------------------------------------------------
* 0            /usr/bin/g++-5     30        auto mode
  1            /usr/bin/g++-4.8   10        manual mode
  2            /usr/bin/g++-4.9   20        manual mode
  3            /usr/bin/g++-5     30        manual mode

Press enter to keep the current choice[*], or type selection number: (I just hit enter)

;;And now you should be set!

--END--

@jcdenton2k jcdenton2k changed the title Kernel 4.5.1 Build Failed fstack-protector-strong-not-supported [SOLVED] Kernel 4.5.1 Build Failed fstack-protector-strong-not-supported Apr 17, 2016
@FreedomBen
Copy link
Owner

thank you!

@jcdenton2k
Copy link
Author

This issue is resolved. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants