NVIDIA driver 396.24 won't compile for kernel-4.18.0-rc1

Hi all,

I posted this in a wrong place…so now I’m posting here.
I tried to compile nvidia driver 396.24 on Fedora 28 (gcc-8.1.1) for kernel 4.18.0-rc1 available on www.kernel.org, but in vain. It looks like nvidia driver uses __put_devmap_namaged_page and it causes a problem.

The associated part of nvidia-installer.log is as follows. Please check it.

Thanks in advance!

-Tetsuji Rai

=====================================================================
LD [M] /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia.o
Building modules, stage 2.
MODPOST 1 modules
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘__put_devmap_managed_page’
make[3]: *** [/usr/src/kernels/linux-4.18-rc1/scripts/Makefile.modpost:92: __modpost] Error 1
make[3]: Target ‘_modpost’ not remade because of errors.
make[2]: *** [/usr/src/kernels/linux-4.18-rc1/Makefile:1509: modules] Error 2
make[2]: Leaving directory ‘/usr/src/kernels/linux-4.18-rc1’
make[1]: *** [Makefile:146: sub-make] Error 2
make[1]: Target ‘modules’ not remade because of errors.
make[1]: Leaving directory ‘/usr/src/kernels/linux-4.18-rc1’
make: *** [Makefile:79: modules] Error 2
-> Error.
ERROR: An error occurred while performing the step: “Checking to see whether the nvidia kernel module was successfully built”. See /var/log/nvidia-installer.log for details.
-> The command cd ./kernel; /usr/bin/make -k -j8 NV_KERNEL_MODULES="nvidia" NV_EXCLUDE_KERNEL_MODULES="" SYSSRC="/lib/modules/4.18.0-rc1-maverick/source" SYSOUT="/lib/modules/4.18.0-rc1-maverick/build" failed with the following output:

make[1]: Entering directory ‘/usr/src/kernels/linux-4.18-rc1’
make[2]: Entering directory ‘/usr/src/kernels/linux-4.18-rc1’
CC [M] /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-pci-table.o
ld -r -o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-interface.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-frontend.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-instance.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-acpi.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-chrdev.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-cray.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-dma.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-gvi.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-i2c.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-mempool.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-mmap.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-p2p.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-pat.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-procfs.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-usermap.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-vm.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-vtophys.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/os-interface.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/os-mlock.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/os-pci.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/os-registry.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/os-usermap.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-modeset-interface.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-pci-table.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-kthread-q.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-kthread-q-selftest.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-memdbg.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-ibmnpu.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-report-err.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv-rsync.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nv_uvm_interface.o /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia/nvlink_linux.o
LD [M] /tmp/selfgz1953/NVIDIA-Linux-x86_64-396.24/kernel/nvidia.o
Building modules, stage 2.
MODPOST 1 modules
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol ‘__put_devmap_managed_page’
make[3]: *** [/usr/src/kernels/linux-4.18-rc1/scripts/Makefile.modpost:92: __modpost] Error 1
make[3]: Target ‘_modpost’ not remade because of errors.
make[2]: *** [/usr/src/kernels/linux-4.18-rc1/Makefile:1509: modules] Error 2
make[2]: Leaving directory ‘/usr/src/kernels/linux-4.18-rc1’
make[1]: *** [Makefile:146: sub-make] Error 2
make[1]: Target ‘modules’ not remade because of errors.
make[1]: Leaving directory ‘/usr/src/kernels/linux-4.18-rc1’
make: *** [Makefile:79: modules] Error 2
ERROR: The nvidia kernel module was not created.
ERROR: Installation has failed. Please see the file ‘/var/log/nvidia-installer.log’ for details. You may find suggestions on fixing installation problems in the README available on the Linux driver download page at www.nvidia.com.

See
https://lkml.org/lkml/2018/6/16/9