Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Discussions related to using VirtualBox on Linux hosts.

Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Edmund Laugasson » 26. Oct 2015, 23:38

Using 64-bit Linux Mint 17.2 with newest stable kernel 4.2.4 and VirtualBox 5.0.8 r103449 with guest additions same version.

Tried to run:
sudo vboxconfig
and also:
sudo /etc/init.d/vboxdrv setup

/var/lib/dkms/vboxhost/5.0.8/build/make.log
Code: Select all   Expand viewCollapse view
DKMS make.log for vboxhost-5.0.8 for kernel 4.2.4-040204-generic (x86_64)
Monday October   26 23:27:45 EET 2015
make: Entering directory `/usr/src/linux-headers-4.2.4-040204-generic'
Makefile:659: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
  LD      /var/lib/dkms/vboxhost/5.0.8/build/built-in.o
  LD      /var/lib/dkms/vboxhost/5.0.8/build/vboxdrv/built-in.o
  CC [M]  /var/lib/dkms/vboxhost/5.0.8/build/vboxdrv/linux/SUPDrv-linux.o
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make[2]: *** [/var/lib/dkms/vboxhost/5.0.8/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[1]: *** [/var/lib/dkms/vboxhost/5.0.8/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/vboxhost/5.0.8/build] Error 2
make: Leaving directory `/usr/src/linux-headers-4.2.4-040204-generic'


/var/log/vbox-install.log
Code: Select all   Expand viewCollapse view
Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/5.0.8/source ->
                 /usr/src/vboxhost-5.0.8

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.2.4-040204-generic -C /lib/modules/4.2.4-040204-generic/build M=/var/lib/dkms/vboxhost/5.0.8/build....(bad exit status: 2)
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/4.2.4-040204-generic/build modules
Makefile:659: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (      \
   echo >&2;                     \
   echo >&2 "  ERROR: Kernel configuration is invalid.";      \
   echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
   echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \
   echo >&2 ;                     \
   /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/4.2.4-040204-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2


Usually there are no problems with new kernels.... What could be solution?
Edmund Laugasson
 
Posts: 16
Joined: 2. Feb 2015, 23:31
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu derivates

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Perryg » 27. Oct 2015, 00:13

It looks to me like a GCC error probably due to the new kernel, but that you would need to ask of the kernel folks. Or drop back to an older kernel for a bit.
Perryg
Site Moderator
 
Posts: 34320
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby matthewls » 27. Oct 2015, 19:45

I had to install gcc 4.9 to get nvidia drivers installed on kernel 4.2.4.
After installing kernel 4.2.5, the VMs wouldn't run, and sbin/vboxconfig threw an error that dmsg described
'VirtualBox' uses 32-bit capabilities (legacy support in use).'

Reinstalling VB5.08 fixed it.
matthewls
 
Posts: 10
Joined: 20. Oct 2015, 07:23

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Perryg » 27. Oct 2015, 19:50

'VirtualBox' uses 32-bit capabilities (legacy support in use).'

Is not an error it is a warning, but saying that you had to reinstall does make since. Some drivers are only installed that way and running an update would miss that. Another issue is the new systemd that is being used and it makes it confusing to tell users what to do. Glad you got it going again.
Perryg
Site Moderator
 
Posts: 34320
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby myname1st » 29. Oct 2015, 20:59

I am glad I found this post. Thanks for the info.
I am running Trusty and I followed the same things you did, plus your recommended option here (including uninstall virtualbox, finish the install of the new kernel and headers, and then reinstall of virtualbox), but had no luck.

Your post however gave me a tip on a "better" google search, and it lead me to the solution
Trusty's gcc compiler only goes to version 4.8 (even though gcc-4.9base is there, but it won't compile the binaries (that's what i read)).
Anyway, -fstack-protector-strong is a flag that was introduced in gcc-4.9. After doing some googling on the safest way to update to gcc-4.9, i came across a couple of links , and it suggested that the safest way per Ubuntu's Wiki on Toolchains (wiki ubuntu com/ToolChain) was to use the Toolchain Updates PPA.

sure enough, i added the TEST PPA (ubuntu-toolchain-r/test), did a standard apt-get update and dist-upgrade, and gcc was correctly updated to 4.9.

Once i did that, i reinstalled the kernel and headers and no errors. I then proceeded to run your suggestion: sudo /sbin/rcvboxdrv setup and voila. Yay.

For those googling, this also helps with kernel 4.2.5

Thanks for the post and the hints

ps: I just registered to provide this for future googlers, so it didn't let me use the links tag. Sorry for just putting the text, but i was happy and wanted to help others like you helped me. :D
myname1st
 
Posts: 1
Joined: 29. Oct 2015, 19:39

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Edmund Laugasson » 31. Oct 2015, 21:05

Thanks for the hints - I got solution from PPA https://launchpad.net/~sergey-dryabzhin ... /toolchain and updated GCC. PPA found using Y-PPA (https://launchpad.net/y-ppa-manager). Also I installed 4.2.5 kernel and after running sudo /etc/init.d/vboxdrv setup the VirtualBox worked like a charm. You may want to run also sudo vboxconfig after that. Noticed that also GCC 5.2 is out (https://gcc.gnu.org/) but did not find yet any PPA and perhaps it is not yet needed.
Edmund Laugasson
 
Posts: 16
Joined: 2. Feb 2015, 23:31
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu derivates

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Edmund Laugasson » 11. Nov 2015, 20:19

Still there seems to be problem. I updated to kernel 4.2.6 recently (64-bit) in Linux Mint 17.2 Cinnamon and also VirtualBox 5.0.10 r104061 - even I have dkms package and also newer 4.9.2 GCC installed (as mentioned in previous post) - still the new kernel module were not compiled. Actually during kernel installation I noticed that everything went fine. It seems that only for current kernel the new modules were compiled but not for the new kernel. I installed new kernel and VirtualBox in the same update session and then made restart to take new kernel and other updates in use. Then removed old kernel (4.2.5 in current case). Manual solution currently was to run sudo /etc/init.d/vboxdrv setup and then also sudo vboxconfig after that. But I suppose dkms should do this module compiling for all existing kernels installed on the system? Earlier times it was so and I never had any kind of such problems regardless when I installed new kernel or VirtualBox itself.
Edmund Laugasson
 
Posts: 16
Joined: 2. Feb 2015, 23:31
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu derivates

Re: Kernel 4.2.4: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG

Postby Edmund Laugasson » 2. Jan 2016, 00:25

Now I have to admit that even manually running configuring does not help. This is actually a little bit another problem and persists with 4.3 kernel.
Currently using kernel 4.2.8-040208-generic and 64-bit Linux Mint 17.3 Cinnamon (clean install) and gcc 4.9.3 is installed. Virtualbox 5.0.12 r104815 is installed.

EDIT: it seems that the package gcc-4.9 itself was not installed during upgrade after repo was added. Solution was:
Code: Select all   Expand viewCollapse view
sudo apt-get install gcc-4.9
sudo ldconfig
cd /usr/bin/
ln -sf gcc-4.9 gcc
/etc/init.d/vboxdrv setup


then checking version shows already new one:
Code: Select all   Expand viewCollapse view
gcc -v
...............
gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2sergey1~trusty1)


EDIT2: this GCC 4.9.x will work also with 4.3.x and 4.4.x kernels.
If you need GCC 5.x and newer then there is also the ppa:ubuntu-toolchain-r/test repository available.
Edmund Laugasson
 
Posts: 16
Joined: 2. Feb 2015, 23:31
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Ubuntu derivates


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 10 guests