355 branched and committed to SVN
Luca Boccassi
luca.boccassi at gmail.com
Sat Oct 17 13:21:34 UTC 2015
On Sat, 2015-10-17 at 02:38 +0200, Andreas Beckmann wrote:
> 355.11 does neither build for the squeeze kernel (2.6.?) nor for any of the kernels between 3.2 and 3.16 (only the wheezy and jessie release and backports kernels work). It builds fine from 4.0 onwards.
> 308.xx seems to have the same problems (still running)
>
> [...]
> CONFTEST: drm_available
> CONFTEST: nvidia_grid_build
> cc -Wp,-MD,/usr/src/modules/nvidia-kernel/nvidia-modeset/.nvidia-modeset-linux.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/usr/src/linux-headers-3.12-0.bpo.1-common/arch/x86/include -Iarch/x86/include/generated -I/usr/src/linux-headers-3.12-0.bpo.1-common/include -Iinclude -I/usr/src/linux-headers-3.12-0.bpo.1-common/arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I/usr/src/linux-headers-3.12-0.bpo.1-common/include/uapi -Iinclude/generated/uapi -include /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/kconfig.h -I/usr/src/modules/nvidia-kernel -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCON
> F
> IG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=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 -Wframe-larger-than=2048 -Wno-unused-but-set-variable -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -DCC_HAVE_ASM_GOTO -I/usr/src/modules/nvidia-kernel/common/inc -I/usr/src/modules/nvidia-kernel -Wall -MD -Wsign-compare -Wno-cast-qual -Wno-error -D__KERNEL__ -DMODULE -DNVRM -DNV_VERSION_STRING=\"358.09\" -Wno-unused-function -Wuninitialized -fno-strict-aliasing -mno-red-zone -mcmodel=kernel -DNV_UVM_ENABLE -Wno-sign-compare -Wno-format-extra-args -I/usr/src/modules/nvidia-kernel/nvidia-modeset -UDEBUG -U_DEBUG -DNDEBUG -DNV_BUILD_MODULE_INSTANCES=0 -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(nvidia_modeset_linux)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia_modeset)" -c -o /usr/src/modules/nvidia-kernel/nvidia-modeset/.tmp
> _
> nvidia-modeset-linux.o /usr/src/modules/nvidia-kernel/nvidia-modeset/nvidia-modeset-linux.c
> In file included from /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/compiler.h:54:0,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/uapi/linux/stddef.h:1,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/stddef.h:4,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/uapi/linux/posix_types.h:4,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/uapi/linux/types.h:13,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/types.h:5,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/list.h:4,
> from /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/module.h:9,
> from /usr/src/modules/nvidia-kernel/nvidia-modeset/nvidia-modeset-linux.c:11:
> /usr/src/linux-headers-3.12-0.bpo.1-common/include/linux/compiler-gcc.h:103:30: fatal error: linux/compiler-gcc5.h: No such file or directory
> compilation terminated.
> /usr/src/linux-headers-3.12-0.bpo.1-common/scripts/Makefile.build:308: recipe for target '/usr/src/modules/nvidia-kernel/nvidia-modeset/nvidia-modeset-linux.o' failed
> make[5]: *** [/usr/src/modules/nvidia-kernel/nvidia-modeset/nvidia-modeset-linux.o] Error 1
> /usr/src/linux-headers-3.12-0.bpo.1-common/Makefile:1245: recipe for target '_module_/usr/src/modules/nvidia-kernel' failed
> make[4]: *** [_module_/usr/src/modules/nvidia-kernel] Error 2
> Makefile:130: recipe for target 'sub-make' failed
> make[3]: *** [sub-make] Error 2
> Makefile:8: recipe for target 'all' failed
> make[2]: *** [all] Error 2
> make[2]: Leaving directory '/usr/src/linux-headers-3.12-0.bpo.1-amd64'
> Makefile:83: recipe for target 'modules' failed
> make[1]: *** [modules] Error 2
> make[1]: Leaving directory '/usr/src/modules/nvidia-kernel'
> debian/rules:46: recipe for target 'build-stamp' failed
> make: *** [build-stamp] Error 2
> BUILD FAILED!
>
> cc is clearly the wrong compiler to use!
I've done a bit of digging.
That include originally comes from Nvidia's include of linux/module.h in
various source files, among which the common header nv-linux.h. Going
down the chain of includes, that failing include is generated by the
following snippet in include/linux/compiler-gcc.h:
#define __gcc_header(x) #x
#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
#define gcc_header(x) _gcc_header(x)
#include gcc_header(__GNUC__)
The header for gcc5 is available in all kernels 3.x and newer currently
in the Debian archive, including 3.2, because it had to be backported
(it first appeared at the time of 3.18).I assume that since 3.12 is no
longer in the archive, and it was added before, then it's not there.
It's also not in the currently maintained 2.6 headers.
355.11 and 358.09 build fine in sid chroots for all currently maintained
kernel versions from 3.2 and up:
# dkms status
nvidia-current, 355.11, 3.16.0-0.bpo.4-amd64, x86_64: installed
nvidia-current, 355.11, 3.16.0-4-amd64, x86_64: installed
nvidia-current, 355.11, 3.2.0-4-amd64, x86_64: installed
nvidia-current, 355.11, 4.0.0-2-amd64, x86_64: installed
nvidia-current, 355.11, 4.1.0-1-amd64, x86_64: installed
nvidia-current, 355.11, 4.2.0-1-amd64, x86_64: installed
nvidia-current, 355.11, 4.3.0-rc5-amd64, x86_64: installed
# dkms status
nvidia-current, 358.09, 3.16.0-0.bpo.4-amd64, x86_64: installed
nvidia-current, 358.09, 3.16.0-4-amd64, x86_64: installed
nvidia-current, 358.09, 3.2.0-4-amd64, x86_64: installed
nvidia-current, 358.09, 4.0.0-2-amd64, x86_64: installed
nvidia-current, 358.09, 4.1.0-1-amd64, x86_64: installed
nvidia-current, 358.09, 4.2.0-1-amd64, x86_64: installed
nvidia-current, 358.09, 4.3.0-rc5-amd64, x86_64: installed
This also applied to i386 and armhf (3.16 onward, haven't tested on 3.2
since there's no armmp kernel).
Since the modules are built locally at install time, in my opinion this
is not an issue. If a user is building against a 2.6 or unmaintained
kernel, then most likely gcc5 will not be the default compiler.
Kind regards,
Luca Boccassi
More information about the pkg-nvidia-devel
mailing list