Comment 0 for bug 1574982

dino99 (9d9) wrote :

Installing the latest 4.4.0-22 kernel ends with that error logged into dkmsbuildlog

make "CC=cc" KBUILD_VERBOSE= -C /lib/modules/4.4.0-22-generic/build M=/var/lib/dkms/nvidia-361/361.42/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.4.0-22-generic/build NV_KERNEL_OUTPUT=/lib/modules/4.4.0-22-generic/build NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset" INSTALL_MOD_DIR=kernel/drivers/video modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-22-generic'
arch/x86/Makefile:133: stack-protector enabled but compiler support broken
Makefile:670: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

the latest error logged is:

/var/lib/dkms/nvidia-361/361.42/build/nvidia/nv-frontend.c:1:0: error: code model kernel does not support PIC mode

Looks like it is related to the latest changes updates: gcc-6/gcc-5 5.3.1-16ubuntu2 (some packages built with gcc-6; gcc-5 disabled for the packages built with gg-6)
Maybe some alternatives has not been updated to take care of these changes, as asked some time ago:

This has been firstly reported against a nvidia crash:

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gcc 4:5.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: GNOME
Date: Tue Apr 26 08:41:32 2016
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)