While installing via yay from AUR nvidia 340 driver i have this error
Its can be solved?
(1/1) Install DKMS modules
==> dkms install --no-depmod nvidia/340.108 -k 6.2.2-artix1-1
Error! Bad return status for module build on kernel: 6.2.2-artix1-1 (x86_64)
Consult /var/lib/dkms/nvidia/340.108/build/make.log for more information.
==> WARNING: `dkms install --no-depmod nvidia/340.108 -k 6.2.2-artix1-1' exited 10
home:[freeartist-artix]:~/Downloads$
/var/lib/dkms/nvidia/340.108/build/make.log 1755/1755 100%
DKMS make.log for nvidia-340.108 for kernel 6.2.2-artix1-1 (x86_64)
Wed 8 Mar 01:47:37 EET 2023
gcc-version-check failed:
The compiler used to compile the kernel (gcc
12.1) does not exactly match the current compiler
(gcc 12.2). 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.
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.2.2-artix1-1/build SYSOUT=/lib/modules/6.2.2-artix1-1/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) 12.2.1 20230201
You are using: cc (GCC) 12.2.1 20230201
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:2021: ..] 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'