View previous topic :: View next topic |
Author |
Message |
dataking Apprentice
Joined: 20 Apr 2005 Posts: 251
|
Posted: Tue Mar 14, 2017 7:21 pm Post subject: -fstack-protector not supported by compiler? |
|
|
Trying to install/compile the gentoo-sources kernel 4.9.6-r1, and it fails with the following error:
Code: | *Enable tracing for RCU (RCU_TRACE) [N/y/?] n
*Provide debugging asserts for adding NO_HZ support to an arch (RCU_EQS_DEBUG) [N/y/?] (NEW)
*Force round-robin CPU selection for unbound work items (DEBUG_WQ_FORCE_RR_CPU) [N/y/?] (NEW)
*Force extended block device numbers and spread them (DEBUG_BLOCK_EXT_DEVT) [N/y/?] n
*Enable CPU hotplug state control (CPU_HOTPLUG_STATE_CONTROL) [N/y/?] (NEW)
*Notifier error injection (NOTIFIER_ERROR_INJECTION) [N/m/y/?] (NEW)
*--
* SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
* HOSTCC scripts/basic/bin2c
* CHK include/config/kernel.release
* UPD include/config/kernel.release
*Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
*make: *** [Makefile:1066: prepare-compiler-check] Error 1
*--
|
All of the searching I've done seems to indicate that gcc needs to be updated to compile the newer kernels. But all of the forum and mailing list threads I can find are usually talking about "older" gcc's, e.g. 4.3.x/4.4.x, etc. I'm currently on gcc-4.9.4 and it seems the only newer versions in portage are 5.x.
Do I need to migrate to gcc-5.x to compile this kernel? If so, shouldn't the kernel ebuild require >=gcc-5.x?
Am I missing something?
TIA _________________ -= the D@7@k|n& =- |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54208 Location: 56N 3W
|
Posted: Tue Mar 14, 2017 8:08 pm Post subject: |
|
|
dataking,
What does show?
and the output of Code: | emerge sys-devel/gcc -pv | please? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Wed Mar 15, 2017 1:32 pm Post subject: Re: -fstack-protector not supported by compiler? |
|
|
dataking wrote: | Do I need to migrate to gcc-5.x to compile this kernel? |
You don't. Gcc 4.9 does support -fstack-protector (and even -fstack-protector-strong). |
|
Back to top |
|
|
dataking Apprentice
Joined: 20 Apr 2005 Posts: 251
|
Posted: Wed Mar 15, 2017 5:04 pm Post subject: |
|
|
Neddy, requested output below. Thanks!
Code: | $ sudo gcc-config -l
[1] i686-pc-linux-gnu-4.9.4 *
|
NeddySeagoon wrote: | Code: | emerge sys-devel/gcc -pv |
|
Code: | $ sudo emerge -pv sys-devel/gcc
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] sys-devel/gcc-4.9.4:4.9.4::gentoo USE="cxx fortran nls nptl openmp sanitize vtv (-altivec) (-awt) -cilk -debug -doc (-fixed-point) -gcj -go -graphite (-hardened) (-libssp) (-multilib) -nopie -nossp -objc -objc++ -objc-gc -regression-test -vanilla" 88,027 KiB
Total: 1 package (1 reinstall), Size of downloads: 88,027 KiB
|
_________________ -= the D@7@k|n& =- |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Wed Mar 15, 2017 5:17 pm Post subject: |
|
|
Quote: | If so, shouldn't the kernel ebuild require >=gcc-5.x? |
The kernel it's self does not depend on gcc-5, because you enabled that kernel config option, that is why it is needing gcc-5; you could easily disable that config option and not depend on gcc-5... |
|
Back to top |
|
|
dataking Apprentice
Joined: 20 Apr 2005 Posts: 251
|
Posted: Wed Mar 15, 2017 10:23 pm Post subject: |
|
|
ct85711 wrote: | Quote: | If so, shouldn't the kernel ebuild require >=gcc-5.x? |
The kernel it's self does not depend on gcc-5, because you enabled that kernel config option, that is why it is needing gcc-5; you could easily disable that config option and not depend on gcc-5... | Well, if it's really Just That Simple™......
The odd thing about it though, is this is just from a "genkernel all". I'm not trying to do anything "fancy". (genkernel.conf is also *mostly* default.) Which should mean that others trying to build/install this kernel with genkernel should be seeing similar issues. If they aren't then it's something unique to my environment. The problem is, I have no idea what (is unique)! _________________ -= the D@7@k|n& =- |
|
Back to top |
|
|
Parmenides n00b
Joined: 02 Apr 2008 Posts: 15
|
Posted: Mon Jun 05, 2017 9:54 am Post subject: |
|
|
dataking wrote: | ct85711 wrote: | Quote: | If so, shouldn't the kernel ebuild require >=gcc-5.x? |
The kernel it's self does not depend on gcc-5, because you enabled that kernel config option, that is why it is needing gcc-5; you could easily disable that config option and not depend on gcc-5... | Well, if it's really Just That Simple™......
The odd thing about it though, is this is just from a "genkernel all". I'm not trying to do anything "fancy". (genkernel.conf is also *mostly* default.) Which should mean that others trying to build/install this kernel with genkernel should be seeing similar issues. If they aren't then it's something unique to my environment. The problem is, I have no idea what (is unique)! |
same problem and no idea how to solve |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
|
Back to top |
|
|
Tzvi n00b
Joined: 22 Jun 2017 Posts: 3
|
Posted: Thu Jun 22, 2017 2:48 pm Post subject: |
|
|
I am having the exact same issue; but I am already running GCC 5.x (5.4.0)
At this point I think it makes sense for me to turn the option off; but I am a newbie and not quite sure how to do that. I tried using genkernal --menuconfig all, but I have no idea what exactly I need to turn off.
Any help? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54208 Location: 56N 3W
|
Posted: Thu Jun 22, 2017 3:06 pm Post subject: |
|
|
Tzvi,
Have you selected gcc-5.4 and performed the revdep-rebuild or do you have gcc-5.4 installed but not yet in use?
What does say? _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Tzvi n00b
Joined: 22 Jun 2017 Posts: 3
|
Posted: Thu Jun 22, 2017 4:47 pm Post subject: |
|
|
I managed to find the option to disable and everything is working well now.
Thanks NeddySeagoon |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54208 Location: 56N 3W
|
Posted: Thu Jun 22, 2017 4:53 pm Post subject: |
|
|
Tzvi,
It works for the wrong reasons.
fstack-protector is a security feature.
The correct course of action is to fix the problem, not work around it by disabling security features. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Jun 22, 2017 5:25 pm Post subject: |
|
|
the hint to turn off the option was also made with install a gcc that could support it because the user have a 4x gcc series, and i recommand the switching to gcc 5x over turning off the option.
out of the two options, you create a 3rd: use a gcc 5 and turn the option off.
sorry, that's a bad 3rd option. |
|
Back to top |
|
|
Tzvi n00b
Joined: 22 Jun 2017 Posts: 3
|
Posted: Thu Jun 22, 2017 5:51 pm Post subject: |
|
|
Thank you all for explaining it to me, I feel better about Gentoo knowing that there is an awesome community like this.
I will attempt to create the kernel with all the necessary security. |
|
Back to top |
|
|
sevilla.larry n00b
Joined: 09 Nov 2015 Posts: 42
|
Posted: Mon Jun 04, 2018 2:50 am Post subject: |
|
|
genkernel all
Got the same error:
Code: | *Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler |
gcc-config -l
Code: | [1] i686-pc-linux-gnu-6.4.0 * |
emerge sys-devl/gcc -pv
Code: |
[ebuild R ] sys-devl/gcc-6.4.0-r1:6.4.0::gentoo USE="cxx fortran nls nptl openmp pch (pie) sanitize ssp vtv (-altivec) (-awt) -cilk -debu -doc (-fixed-point) (-gcj) -go -graphite (-hardened) (-jlt) (-libssp) -mpx (-multilib) -objc -objc++ -objc-gc-pgo -regression-test -vanilla" 74,387 KiB
|
|
|
Back to top |
|
|
acmondor n00b
Joined: 08 Aug 2014 Posts: 59 Location: Canadian Prairies
|
Posted: Tue Jun 05, 2018 4:19 pm Post subject: |
|
|
I encountered this same problem with "genkernel all" yesterday. I normally don't use genkernel, but I was having trouble getting a manually build kernel to boot as a qemu guest so I thought I'd give it a try. This is on brand new install using the lastest stage3 with gcc 6.4.0. The odd thing is that version of gcc most definitely supports -fstack-protector. I confirmed that by compiling as simple hello world program with that option. I also eventually abandoned genkernel and returned to my manually configured kernel, which I did manage to get working, and it does use CONFIG_CC_STACKPROTECTOR_REGULAR. So, it does seem like there is something not quite right with the way genkernel is doing things. |
|
Back to top |
|
|
LIsLinuxIsSogood Veteran
Joined: 13 Feb 2016 Posts: 1179
|
Posted: Sun Aug 05, 2018 5:05 am Post subject: |
|
|
I would find it difficult to believe the problem is with anything other than user systems being misconfigured when running the tool.
Neddy, I think the reason advising about changing kernel configuration option seems incorrect is because that is the purpose of the tool in the first place to not have to configure the kernel
Also developers of this kind of automated tool that does the work for the user cannot account for every feature, and setting that woud be present andcould possibly go crazy attempting that. If the genkernel doesn't build the kernel on the system, it is either time to upgrade the system, reinstall the system, or else learn to manually configure and build the kernel without the need for genkernel.
Those seem like viable options. I don't know what genkernel can do that is so great anyway, anyone??? |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Aug 05, 2018 2:59 pm Post subject: |
|
|
LIsLinuxIsSogood wrote: | Those seem like viable options. I don't know what genkernel can do that is so great anyway, anyone??? |
LIsLinuxIsSogood ... it increases the number of posts on the forum tenfold, and so doubleplusgood.
best ... khay |
|
Back to top |
|
|
|