LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-21-2018, 07:14 PM   #1
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Rep: Reputation: 13
config stackprotector flag error with make of kernel


I have installed 14.2 from an install DVD on a new ASUS that has a Realtek wireless chip. The default install doesn't recognize the chip and so I have no wireless. Which means I have NO internet connection at all, because the computer doesn't have an ethernet port either (Wasn't aware that was a thing with laptops now.) I am trying to get the driver installed for Realtek 8821 and have had a problem with getting that to work because the kernel installed from the DVD is 4.4.14-smp and it needs to be >= 4.15. I am trying to build 4.18.8. I am following the instructions here.
http://docs.slackware.com/howtos:sla...kernelbuilding

I got as far as "make xconfig" and then used "make all". The results were:
Quote:
scripts/kconfig/conf --silentoldconfig Kconfig
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/include/generated/asm/unistd_64_x32.
SYSTBL arch/x86/include/generated/asm/syscall_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32x.h
HOSTCC scripts/basic/bin2c
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
CHK include/config/kernel.release
UPD include/config/kernel.release
Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler
Makefile:1114: recipe for target 'prepare-compiler-check' failed
make: *** [prepare-compiler-check] Error 1
I looked up "Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: -fstack-protector not supported by compiler"
and found something that said it was a result of having multiple versions of gcc installed.

I have only installed what was on the install DVD. When I
Code:
gcc --version (and g++)
returns
Quote:
gcc (GCC) 5.3.0
So I don't think it's the compiler. But I don't know for sure. What else can be causing the error?

A different search for just "CONFIG_CC_STACKPROTECTOR_REGULAR" turned up this:
https://stackoverflow.com/questions/...ector#10713047

If I understand the accepted answer correctly, I don't need this on my computer in order to make the new kernel. When I looked in the kernel's Makefile for the lines with the relevant flag, on lines 693-715 or so, it says:

Code:
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
  stackp-flag := -fstack-protector
  stackp-name := REGULAR
else
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
  stackp-flag := -fstack-protector
  stackp-name := STRONG
else
  # Force off for distro compilers that enable stack protector by default.
  stackp-flag := $(call cc-option, -fno-stack-protector)
endif
endif
# Find arch-specific stack protector compiler sanity-checking script.
ifdef CONFIG_CC_STACKPROTECTOR
  stackp-path := $(srctree)/scripts/gcc-$(SRCARCH)_$(BITS)-has-stack-protector.sh
  stackp-check := $(wildcard $(stackp-path))
endif
What do I need to change to stop the CONFIG_CC_STACKPROTECTOR_ problem when I try to make the new kernel, assuming the problem is with the kernel Makefile and not something else?

Last edited by deretsigernu; 09-21-2018 at 07:18 PM. Reason: add info
 
Old 09-22-2018, 04:09 AM   #2
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
That version of gcc seems adequate based on this. I suppose it's possible that a newer version of gcc is required for 4.18.xx and -fstack-protector-strong but I can't find anything to corroborate that, in fact it seems that gcc 4.8 should be good enough.
If you're sure that you don't have any compiler options specified in your environment somewhere that might be causing this you could try disabling "Strong Stack Protector" (not ideal) in the "General setup" of your kernel config, make clean and then make again, or you could try an older kernel like 4.16.
 
Old 09-22-2018, 05:19 AM   #3
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
You don't need to build your own 4.18 kernel.
https://dusk.idlemoor.tk/linux-4.18/x86_64/
 
Old 09-22-2018, 06:45 PM   #4
deretsigernu
Member
 
Registered: May 2007
Distribution: Slackware 14.2/-current
Posts: 185

Original Poster
Rep: Reputation: 13
@fskmh, I don't know all the settings in the config to know what could be causing the problem. They're all default.

@55020, thanks for the link. I'm not sure what to do with all those files you linked to. I always pointed and clicked at something ready to download and make. To start, I downloaded the kernel generic, kernel headers, kernel modules, and kernel source (txz for each). They are on a different computer than what this thread is written about, so I have to move them over. If I put them on a thumbdrive and extract them to a new folder in /usr/src, what do I do next? For example, do I need to make anything? What order do the files need to processed? What other steps do I need? The only thing I know about modifying the kernel is what I linked to in my first post, where I said "... following instructions here:".
 
Old 09-26-2018, 12:00 AM   #5
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by deretsigernu View Post
@55020, thanks for the link. I'm not sure what to do with all those files you linked to. I always pointed and clicked at something ready to download and make. To start, I downloaded the kernel generic, kernel headers, kernel modules, and kernel source (txz for each). They are on a different computer than what this thread is written about, so I have to move them over. If I put them on a thumbdrive and extract them to a new folder in /usr/src, what do I do next? For example, do I need to make anything? What order do the files need to processed? What other steps do I need? The only thing I know about modifying the kernel is what I linked to in my first post, where I said "... following instructions here:".
These are pre-compiled packages and are all ready for installation. Then you would just need to regenerate an initrd, ensure your bootloader (lilo, grub, etc) is up-to-date with the newer kernel, then reboot.
 
1 members found this post helpful.
Old 10-02-2018, 02:02 PM   #6
slac-in-the-box
Member
 
Registered: Mar 2010
Location: oregon
Distribution: slackware64-15.0 / slarm64-current
Posts: 780
Blog Entries: 1

Rep: Reputation: 432Reputation: 432Reputation: 432Reputation: 432Reputation: 432
Quote:
If I put them on a thumbdrive and extract them to a new folder in /usr/src, what do I do next?
As bassmadigral indicated: these packages are not source code--they are slackware packages! To install them, put your thumbdrive in... mount it to /mnt/tmp, or any mountpoint of your choice, and then use installpkg or upgradepkg... And as he also said, you might want to check out the script: /usr/share/mkinitrd/mkinitrd_command_generator.sh, which can produce the mkinitrd command for you. Update your bootloader, and good to go. I don't think it matters which order you install them, but I usually go: source, headers, generic, modules.
 
1 members found this post helpful.
Old 10-02-2018, 04:41 PM   #7
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by slac-in-the-box View Post
I don't think it matters which order you install them, but I usually go: source, headers, generic, modules.
It doesn't matter unless you install both the huge and generic kernels and use the /boot/vmlinuz symlink.

The reason why is both the huge and generic kernels have a script that is run at the end of installation that will update symlinks. Both will update the /boot/vmlinuz symlink to point to its own kernel. The last one run will be the one that /boot/vmlinuz is linked against. So, if you rely on /boot/vmlinuz symlink for your bootloader, make sure the kernel you want to use is used last.

I typically recommend referencing the specific kernel rather than relying on the symlink, but that's just personal preference.
 
2 members found this post helpful.
  


Reply

Tags
compilekernel, compiler-flag, compilerconfigure, gcc, kernel



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS v7.10 - Pkg-config ( 6.19.1) make error /arun/ank Linux From Scratch 2 12-19-2016 05:14 PM
get this error when runnign make ***** "no rule to make target 'config'. stop" procfs Linux - General 4 05-12-2013 10:25 AM
Error when running make config as I'm busy compiling my kernel on Slackware 12.1.0 Linux Duke Slackware 11 02-09-2012 08:49 AM
make config error jb2013 Linux - Newbie 4 06-02-2010 03:04 PM
make: *** [config.h.in] Error 1 samba4010 Linux - Software 2 01-01-2006 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration