Warning: the compiler differs from the one used to build the kernel

As of 2025-10-21 the new kernel update seems that installing drivers that need llvm is not working. Below the is what is happening:

❯ openrazer-daemon --version
openrazer-daemon 3.10.3

~
❯ sudo dkms install openrazer-driver/3.10.3
[sudo] password for :
Sign command: /usr/lib/modules/6.17.4-3-cachyos/build/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub

Building module(s)...(bad exit status: 2)
Failed command:
KERNELDIR=/lib/modules/6.17.4-3-cachyos/build make driver LLVM=1

Error! Bad return status for module build on kernel: 6.17.4-3-cachyos (x86_64)
Consult /var/lib/dkms/openrazer-driver/3.10.3/build/make.log for more information.

~
❯ cat /var/lib/dkms/openrazer-driver/3.10.3/build/make.log
DKMS (dkms-3.2.2) make.log for openrazer-driver/3.10.3 for kernel 6.17.4-3-cachyos (x86_64)
Tue Oct 21 12:51:57 PM 2025

Building module(s)
# command: KERNELDIR=/lib/modules/6.17.4-3-cachyos/build make driver LLVM=1

:: Compiling OpenRazer kernel modules
========================================
make -C /lib/modules/6.17.4-3-cachyos/build M=/var/lib/dkms/openrazer-driver/3.10.3/build/driver modules
make[1]: Entering directory '/usr/lib/modules/6.17.4-3-cachyos/build'
make[2]: Entering directory '/var/lib/dkms/openrazer-driver/3.10.3/build/driver'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: clang version 20.1.8
  You are using:
  CC [M]  razerkbd_driver.o
clang: error while loading shared libraries: libLLVM.so.20.1: cannot open shared object file: No such file or directory
make[4]: *** [/usr/lib/modules/6.17.4-3-cachyos/build/scripts/Makefile.build:287: razerkbd_driver.o] Error 127
make[3]: *** [/usr/lib/modules/6.17.4-3-cachyos/build/Makefile:2016: .] Error 2
make[2]: *** [/usr/lib/modules/6.17.4-3-cachyos/build/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/var/lib/dkms/openrazer-driver/3.10.3/build/driver'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.17.4-3-cachyos/build'
make: *** [Makefile:38: driver] Error 2

# exit code: 2
# elapsed time: 00:00:00
----------------------------------------------------------------

~
❯ pacman -Q | grep llvm-libs
lib32-llvm-libs 1:21.1.3-2
llvm-libs 21.1.3-3

~
❯ pacman -Qs | grep llvm
local/lib32-llvm-libs 1:21.1.3-2
local/llvm 21.1.3-3
local/llvm-libs 21.1.3-3

~
❯ uname -r
6.17.4-3-cachyos

~
❯ pacman -Qs | grep clang
local/clang 20.1.8-2
    Compiler runtime libraries for clang

~

I would greatly appreciate replies that would help fix this, though I suspect its a mater of waiting for the maintainers to notice and fix the compilers mismatch.

Thanks in advance.

clang got updated a few minutes ago, the issue went away. This can be closed.

You can close it yourself by marking the button below a post as the solution. :wink: