There has been some kernel headers reordering in Linux v4.14.9 and this caused the modules for the NVIDIA v384.98 drivers to fail to compile for me. Here is a patch allowing to fix this issue:
...
/src/nvidia/NVIDIA-Linux-x86_64-387.22-no-compat32/kernel/nvidia-uvm/uvm8_va_block.c: In function ‘block_cpu_fault_locked’:
/usr/src/linux-4.14.9-2.g9423ca2/arch/x86/include/asm/processor.h:826:39: error: implicit declaration of function ‘task_stack_page’; did you mean ‘task_stack_vm_area’? [-Werror=implicit-function-declaration]
unsigned long __ptr = (unsigned long)task_stack_page(task); \
... ^
Too much went into 4.14.9
Some was reverted before releasing 4.14.9
So far one patch is pending a revert https://lkml.org/lkml/2017/12/26/306
They need to be more strict over what goes into -stable trees.
Ouch, 4.13 kernel sources (ubuntu 16.04) are not compatible with nvidia driver.
Even after the fix, I am getting a new error:
In file included from /var/lib/dkms/nvidia/387.26/build/common/inc/conftest.h:5:0,
from /var/lib/dkms/nvidia/387.26/build/common/inc/nv-linux.h:17,
from /var/lib/dkms/nvidia/387.26/build/nvidia/nv-gpu-numa.c:24:
/var/lib/dkms/nvidia/387.26/build/conftest/functions.h:14:2: error: #error kmem_cache_create() conftest failed!