Created attachment 457682 [details] emerge --info Here's what I'm trying to build: [ebuild N ] x11-drivers/nvidia-drivers-375.26:0/375::gentoo USE="X driver kms multilib tools uvm -acpi -compat -gtk3 -pax_kernel -static-libs -wayland" 0 KiB And, how it fails: /var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.c:181:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .access = nvidia_vma_access, ^ /var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.c:181:15: note: (near initialization for 'nv_vm_ops.access') cc1: some warnings being treated as errors /usr/src/linux-4.8.15-hardened/scripts/Makefile.build:289: recipe for target '/var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.o' failed make[3]: *** [/var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.o] Error 1 /usr/src/linux-4.8.15-hardened/Makefile:1478: recipe for target '_module_/var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel' failed make[2]: *** [_module_/var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel] Error 2 make[2]: Leaving directory '/raid/kernel/4.8.15-hardened' Makefile:150: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-4.8.15-hardened' Makefile:81: recipe for target 'modules' failed make: *** [modules] Error 2 * ERROR: x11-drivers/nvidia-drivers-375.26::gentoo failed (compile phase): * emake failed
Tried building x11-drivers/nvidia-drivers-370.28-r1 instead. Got the exact same error, and a warning from the ebuild: * Gentoo supports kernels which are supported by NVIDIA * which are limited to the following kernels: * <sys-kernel/gentoo-sources-4.8 * <sys-kernel/vanilla-sources-4.8 So, what's the story for 375.26? I'm building a new kernel from gentoo-sources-4.9 right now. We'll report on the outcome...
Alright... 375.26 built without issues against gentoo-sources-4.9 For now, this is good enough for me, although I do wonder if the problem is due to gentoo-sources vs hardened-sources or 4.9 vs 4.8.15... I'll make sure to check when hardened-sources-4.9.x shows up.
I'd venture a guess that the issue might boil down to an incompatible change between 4.8 and 4.9, and the fact that I have linux-headers-4.9 installed...
That theory about linux-headers mismatch got quickly falsified. I rolled back linux-headers to 4.8, built against hardened-4.8.15, and got the same error as before.
Please attach the entire build log to this bug report.
Created attachment 457976 [details] build.log Funny, I got another error when trying to reproduce... (BTW, I seem to recall having seen this one as well earlier.)
Created attachment 463884 [details] build.log (with 4.9.9.-hardened) Here's the build.log from my latest attempt with 4.9.9-hardened.
Comment on attachment 457976 [details] build.log cc1: error: incompatible gcc/plugin versions cc1: error: fail to initialize plugin ./scripts/gcc-plugins/colorize_plugin.so
(In reply to Jeroen Roovers from comment #8) > Comment on attachment 457976 [details] > build.log > > cc1: error: incompatible gcc/plugin versions > cc1: error: fail to initialize plugin > ./scripts/gcc-plugins/colorize_plugin.so rebuild the kernel before the nvidia-drivers
(In reply to Magnus Granberg from comment #9) > (In reply to Jeroen Roovers from comment #8) > > Comment on attachment 457976 [details] > > build.log > > > > cc1: error: incompatible gcc/plugin versions > > cc1: error: fail to initialize plugin > > ./scripts/gcc-plugins/colorize_plugin.so > > rebuild the kernel before the nvidia-drivers Well... yes, of course. BUT, that was in the obsoleted build.log ... The newer one (with 4.9.9-hardened) doesn't have that issue. It shows the original problem in the very first report. I can upload the build.log with my latest attempt also, if that helps..
Created attachment 465028 [details] build.log (with 4.9.11-hardened) Latest attempt. Same issue. /var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.c:181:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] .access = nvidia_vma_access, ^ /var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.c:181:15: note: (near initialization for 'nv_vm_ops.access') cc1: some warnings being treated as errors make[3]: *** [/usr/src/linux-4.9.11-hardened/scripts/Makefile.build:294: /var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel/nvidia/nv-mmap.o] Error 1 make[2]: *** [/usr/src/linux-4.9.11-hardened/Makefile:1495: _module_/var/tmp/portage/x11-drivers/nvidia-drivers-375.26/work/kernel] Error 2 make[2]: Leaving directory '/raid/kernel/4.9.11-hardened' make[1]: *** [Makefile:150: sub-make] Error 2 make[1]: Leaving directory '/usr/src/linux-4.9.11-hardened' make: *** [Makefile:81: modules] Error 2
Interestingly, building with USE=pax_kernel works, despite the fact that PaX is disabled in my kernel. Perhaps, that flag needs to be renamed to hardened?