Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 653754 - x11-drivers/nvidia-drivers-340.106 with kernel 4.14.35 - .../work/kernel/uvm/nvidia_uvm_lite.c:857:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
Summary: x11-drivers/nvidia-drivers-340.106 with kernel 4.14.35 - .../work/kernel/uvm/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-22 02:53 UTC by Keith Harrison
Modified: 2018-04-24 11:59 UTC (History)
0 users

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


Attachments
nvidia_uvm_lite.c patch for Kernel 4.14 (nvidia_uvm.patch,1.18 KB, patch)
2018-04-22 02:53 UTC, Keith Harrison
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Harrison 2018-04-22 02:53:41 UTC
Created attachment 528200 [details, diff]
nvidia_uvm_lite.c patch for Kernel 4.14

Patch attached. ( Slightly modified version of patch found here: https://devtalk.nvidia.com/default/topic/1028812/linux/340-106-nvidia-uvm-ko-fails-to-build-under-kernel-4-14-13/ )

Before patch fails with the following error:

/usr/src/linux-4.14.35-gentoo/include/linux/cpumask.h:748:36: note: in expansion of macro ‘for_each_cpu’
 #define for_each_online_cpu(cpu)   for_each_cpu((cpu), cpu_online_mask)
                                    ^~~~~~~~~~~~
/usr/src/linux-4.14.35-gentoo/include/linux/vmstat.h:216:2: note: in expansion of macro ‘for_each_online_cpu’
  for_each_online_cpu(cpu)
  ^~~~~~~~~~~~~~~~~~~
/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c: At top level:
/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:857:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .fault = _fault,
              ^~~~~~
/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:857:14: note: (near initialization for ‘uvmlite_vma_ops.fault’)
/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:887:14: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     .fault = _sigbus_fault,
              ^~~~~~~~~~~~~
/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.c:887:14: note: (near initialization for ‘counters_vma_ops.fault’)
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-4.14.35-gentoo/scripts/Makefile.build:329: /var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm/nvidia_uvm_lite.o] Error 1
make[2]: *** [/usr/src/linux-4.14.35-gentoo/Makefile:1528: _module_/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm] Error 2
make[2]: Leaving directory '/usr/src/linux-4.14.35-gentoo'
make[1]: *** [Makefile:146: sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-4.14.35-gentoo'
NVIDIA: left KBUILD.
 nvidia-uvm.ko failed to build!
make: *** [Makefile:216: nvidia-uvm.ko] Error 1
 * ERROR: x11-drivers/nvidia-drivers-340.106::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=x11-drivers/nvidia-drivers-340.106::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=x11-drivers/nvidia-drivers-340.106::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/kernel/uvm'
 * S: '/var/tmp/portage/x11-drivers/nvidia-drivers-340.106/work/'
Comment 1 Keith Harrison 2018-04-22 02:55:07 UTC
See https://bugs.gentoo.org/635352
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-24 11:52:24 UTC
Looks like I raised the compatibility from 4.11 to 4.14 at one point. That was probably wrong as I now cannot find the build logs to support that.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2018-04-24 11:59:58 UTC
Reverted.