Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 603980 - x11-drivers/nvidia-drivers-375.26 - .../work/kernel/nvidia/nv-mmap.c:181:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
Summary: x11-drivers/nvidia-drivers-375.26 - .../work/kernel/nvidia/nv-mmap.c:181:15: ...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-28 23:39 UTC by Another Mortal
Modified: 2017-03-19 11:36 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (einfo,5.60 KB, text/plain)
2016-12-28 23:39 UTC, Another Mortal
Details
build.log (build.log,10.49 KB, text/plain)
2016-12-30 11:36 UTC, Another Mortal
Details
build.log (with 4.9.9.-hardened) (build.log,36.26 KB, text/x-log)
2017-02-15 19:21 UTC, Another Mortal
Details
build.log (with 4.9.11-hardened) (build.log,36.35 KB, text/x-log)
2017-02-24 19:09 UTC, Another Mortal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Another Mortal 2016-12-28 23:39:38 UTC
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
Comment 1 Another Mortal 2016-12-28 23:50:39 UTC
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...
Comment 2 Another Mortal 2016-12-29 00:33:31 UTC
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.
Comment 3 Another Mortal 2016-12-29 05:43:32 UTC
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...
Comment 4 Another Mortal 2016-12-29 07:23:28 UTC
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.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2016-12-30 11:12:56 UTC
Please attach the entire build log to this bug report.
Comment 6 Another Mortal 2016-12-30 11:36:36 UTC
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.)
Comment 7 Another Mortal 2017-02-15 19:21:31 UTC
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 8 Jeroen Roovers (RETIRED) gentoo-dev 2017-02-23 22:41:31 UTC
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
Comment 9 Magnus Granberg gentoo-dev 2017-02-23 22:51:59 UTC
(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
Comment 10 Another Mortal 2017-02-24 19:06:56 UTC
(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..
Comment 11 Another Mortal 2017-02-24 19:09:04 UTC
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
Comment 12 Another Mortal 2017-03-10 19:28:20 UTC
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?