Anybody else is having problems compiling in kernel 6.3.1? I got the following errors.
$ cat /var/lib/dkms/nvidia/340.108/build/make.log DKMS make.log for nvidia-340.108 for kernel 6.3.1-zen2-1-zen (x86_64) Thu May 11 20:17:30 EDT 2023
gcc-version-check failed:
You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel. The compiler used to compile the kernel was gcc 12.2; the current compiler is gcc 13.1.
If you know what you are doing and want to override the gcc version check, you can do so by setting the IGNORE_CC_MISMATCH environment variable to "1".
In any other case, set the CC environment variable to the name of the compiler that was used to compile the kernel.
*** Failed CC version check. Bailing out! ***
make: *** [nvidia-modules-common.mk:201: build-sanity-checks] Error 1 make: Entering directory '/var/lib/dkms/nvidia/340.108/build/uvm' cd ./..; make module SYSSRC=/lib/modules/6.3.1-zen2-1-zen/build SYSOUT=/lib/modules/6.3.1-zen2-1-zen/build KBUILD_EXTMOD=./..
make[1]: Entering directory '/var/lib/dkms/nvidia/340.108/build' NVIDIA: calling KBUILD... warning: the compiler differs from the one used to build the kernel The kernel was built by: gcc (GCC) 13.1.1 20230429 You are using: cc (GCC) 13.1.1 20230429
make -f ./scripts/Makefile.build obj=.. need-builtin=1 need-modorder=1
scripts/Makefile.build:41: ../Makefile: No such file or directory make[3]: *** No rule to make target '../Makefile'. Stop. make[2]: *** [Makefile:2023: ..] Error 2 NVIDIA: left KBUILD.
nvidia.ko failed to build! make[1]: *** [Makefile:202: nvidia.ko] Error 1 make[1]: Leaving directory '/var/lib/dkms/nvidia/340.108/build' make: *** [Makefile:222: ../Module.symvers] Error 2 make: Leaving directory '/var/lib/dkms/nvidia/340.108/build/uvm'
It looks like it's failed becausde the Makefile is missing. However,
/l/m/6/b/scripts » pwd
/lib/modules/6.3.1-zen2-1-zen/build/scripts
/l/m/6/b/scripts » echo $IGNORE_CC_MISMATCH
1
/l/m/6/b/scripts » ls -las ../Makefile
72 -rw-r--r-- 1 root root 71731 May 10 04:54 ../Makefile
Pinned Comments
JerryXiao commented on 2022-10-13 03:51 (UTC) (edited on 2022-10-14 02:44 (UTC) by JerryXiao)
For testing users, contributors: check out https://github.com/archlinux-jerry/nvidia-340xx
Warning: force push may happen to match the aur tree