Nvidia 340.106 not compiling on the kernel 4.16.7 (on Debian Buster/Sid).

Hi:

In Debian, I can compile perfectly perfectly with the current kernel’s of Debian Buster/Sid.

But, when there comes the hour of doing it with DKMS, it does not leave me, as I would like doing it.

The case is, that if I do it it is DKMS and do with parameter ‘- not - unified-memory’ I have not even this problem, it works marvelously.

I do not remember how I it did a time behind, that exactly, it was when it had the kernel 4.x for above, that yes it was allowing it to me. And it could do without problems without ‘- not - unified-memory’.

With the Debian bundles there is no problem, but to hand yes.

I happen to you here when I it do with the kernel 4.16.7 compiled by me:

creation time: Sat May 12 12:49:09 2018
installer version: 340.106

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/jre1.8.0_171/bin:/root/bin

nvidia-installer command line:
./nvidia-installer

Using: nvidia-installer ncurses v6 user interface
→ License accepted.
→ Installing NVIDIA driver version 340.106.
→ Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: No)
→ Performing CC sanity check with CC=“/usr/bin/cc”.
→ Kernel source path: ‘/lib/modules/4.16.7/source’
→ Kernel output path: ‘/lib/modules/4.16.7/build’
→ Performing rivafb check.
→ Performing nvidiafb check.
→ Performing Xen check.
→ Performing PREEMPT_RT check.
→ Cleaning kernel module build directory.
executing: ‘cd ./kernel; /usr/bin/make clean’…
→ Building NVIDIA kernel module:
executing: ‘cd ./kernel; /usr/bin/make module SYSSRC=/lib/modules/4.16.7/source SYSOUT=/lib/modules/4.16.7/build NV_BUILD_MODULE_INSTANCES=’…
NVIDIA: calling KBUILD…
make[1]: se entra en el directorio ‘/usr/src/linux-headers-4.16.7’
/usr/bin/make -C /lib/modules/4.16.7/build KBUILD_SRC=/usr/src/linux-headers-4.16.7
-f /usr/src/linux-headers-4.16.7/Makefile modules
make[2]: se entra en el directorio ‘/usr/src/linux-headers-4.16.7’
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (
echo >&2;
echo >&2 " ERROR: Kernel configuration is invalid.“;
echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.”;
echo >&2 " Run ‘make oldconfig && make prepare’ on kernel src to fix it.";
echo >&2 ;
/bin/false)
mkdir -p /root/NVIDIA-Linux-x86_64-340.106/kernel/.tmp_versions ; rm -f /root/NVIDIA-Linux-x86_64-340.106/kernel/.tmp_versions/*
/usr/bin/make -f /usr/src/linux-headers-4.16.7/scripts/Makefile.build obj=/root/NVIDIA-Linux-x86_64-340.106/kernel
ld -m elf_x86_64 -z max-page-size=0x200000 -r -o /root/NVIDIA-Linux-x86_64-340.106/kernel/nvidia.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-kernel.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-acpi.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-chrdev.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-cray.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-dma.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-drm.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-gvi.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-i2c.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-mempool.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-mmap.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-p2p.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-pat.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-procfs.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-usermap.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-vm.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-vtophys.o /root/NVIDIA-Linux-x86_64-340.106/kernel/os-interface.o /root/NVIDIA-Linux-x86_64-340.106/kernel/os-mlock.o /root/NVIDIA-Linux-x86_64-340.106/kernel/os-pci.o /root/NVIDIA-Linux
-x86_64-340.106/kernel/os-registry.o /root/NVIDIA-Linux-x86_64-340.106/kernel/os-smp.o /root/NVIDIA-Linux-x86_64-340.106/kernel/os-usermap.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv_uvm_interface.o /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-frontend.o
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-acpi.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-chrdev.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-cray.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-dma.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-drm.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-gvi.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-i2c.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-mempool.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-mmap.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-p2p.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-pat.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-procfs.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-usermap.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-vm.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-vtophys.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-interface.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-mlock.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-pci.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-registry.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-smp.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/os-usermap.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv_uvm_interface.o: No existe el fichero o el directorio
ld: no se puede encontrar /root/NVIDIA-Linux-x86_64-340.106/kernel/nv-frontend.o: No existe el fichero o el directorio
make[3]: *** [/usr/src/linux-headers-4.16.7/scripts/Makefile.build:570: /root/NVIDIA-Linux-x86_64-340.106/kernel/nvidia.o] Error 1
make[2]: *** [/usr/src/linux-headers-4.16.7/Makefile:1561: module/root/NVIDIA-Linux-x86_64-340.106/kernel] Error 2
make[2]: se sale del directorio ‘/usr/src/linux-headers-4.16.7’
make[1]: *** [Makefile:146: sub-make] Error 2
make[1]: se sale del directorio ‘/usr/src/linux-headers-4.16.7’
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make: *** [Makefile:191: nvidia.ko] Error 1
→ Error.
ERROR: Unable to build the NVIDIA kernel module.

And be different, with DKMS, but under kernel of Debian:

creation time: Sat May 12 12:56:22 2018
installer version: 340.106

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/java/jre1.8.0_171/bin:/root/bin

nvidia-installer command line:
./nvidia-installer
–no-unified-memory

Using: nvidia-installer ncurses v6 user interface
→ License accepted.
→ Installing NVIDIA driver version 340.106.
WARNING: The NVIDIA Unified Memory kernel module will not be installed. As a result, CUDA applications will not be able to run with this installation of the NVIDIA driver.
→ Would you like to register the kernel module sources with DKMS? This will allow DKMS to automatically build a new module, if you install a different kernel later. (Answer: Yes)
→ Installing both new and classic TLS OpenGL libraries.
→ Installing both new and classic TLS 32bit OpenGL libraries.
→ Install NVIDIA’s 32-bit compatibility libraries? (Answer: Yes)
→ Skipping installation of the libvdpau wrapper library.
→ Searching for conflicting X files:
→ done.
→ Searching for conflicting OpenGL files:
→ done.
→ Installing ‘NVIDIA Accelerated Graphics Driver for Linux-x86_64’ (340.106):
executing: ‘/sbin/ldconfig’…
→ done.
→ Driver file installation is complete.
→ Installing DKMS kernel module:
ERROR: Failed to run /usr/sbin/dkms build -m nvidia -v 340.106 -k 4.16.0-1-amd64:
Kernel preparation unnecessary for this kernel. Skipping…

Building module:
cleaning build area…
make -j2 KERNELRELEASE=4.16.0-1-amd64 module KERNEL_UNAME=4.16.0-1-amd64; make -C uvm module KERNEL_UNAME=4.16.0-1-amd64 KBUILD_EXTMOD=/var/lib/dkms/nvidia/340.106/build/uvm; make -C uvm module KERNEL_UNAME=4.16.0-1-amd64 KBUILD_EXTMOD=/var/lib/dkms/nvidia/340.106/build/uvm; make -C uvm module KERNEL_UNAME=4.16.0-1-amd64 KBUILD_EXTMOD=/var/lib/dkms/nvidia/340.106/build/uvm…(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.16.0-1-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/340.106/build/make.log for more information.
→ error.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more information.
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.

What I do not remember is, how to implement these things so that it me works, still looking and solving this problem. But with the Debian kernels there is neither any problem, nor fear to put the Nvidia driver.

To excuse because I have many things in mind as to be able to do this quite made work. I already will buy a new laptop one as soon as I trumped my this one.

Thank you very much whom did I answer.