The build fails both when using AUR package and when building manually.
Log from the AUR package at /var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/make.log:
DKMS make.log for lenovo-legion-wmi-r4.c25ebd4 for kernel 6.7.6-arch1-1 (x86_64)
Tue 27 Feb 2024 07:46:25 AM EST
make: Entering directory '/usr/lib/modules/6.7.6-arch1-1/build'
CC [M] /var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.o
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:14: warning: "pr_fmt" redefined
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
|
In file included from ./include/linux/kernel.h:31,
from ./arch/x86/include/asm/percpu.h:27,
from ./arch/x86/include/asm/nospec-branch.h:14,
from ./arch/x86/include/asm/paravirt_types.h:20,
from ./arch/x86/include/asm/ptrace.h:97,
from ./arch/x86/include/asm/math_emu.h:5,
from ./arch/x86/include/asm/processor.h:13,
from ./arch/x86/include/asm/timex.h:5,
from ./include/linux/timex.h:67,
from ./include/linux/time32.h:13,
from ./include/linux/time.h:60,
from ./include/linux/stat.h:19,
from ./include/linux/module.h:13,
from /var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:1:
./include/linux/printk.h:345: note: this is the location of the previous definition
345 | #define pr_fmt(fmt) fmt
|
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:108:10: error: ‘struct ctl_table’ has no member named ‘child’
108 | .child = llwmi_table,
| ^~~~~
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:108:27: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
108 | .child = llwmi_table,
| ^~~~~~~~~~~
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:108:27: note: (near initialization for ‘llwmi_child_table[0]’)
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:108:27: error: incompatible types when initializing type ‘enum <anonymous>’ using type ‘struct ctl_table *’
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:117:10: error: ‘struct ctl_table’ has no member named ‘child’
117 | .child = llwmi_child_table,
| ^~~~~
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:117:27: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
117 | .child = llwmi_child_table,
| ^~~~~~~~~~~~~~~~~
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:117:27: note: (near initialization for ‘llwmi_root_table[0]’)
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:117:27: error: incompatible types when initializing type ‘enum <anonymous>’ using type ‘struct ctl_table *’
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c: In function ‘setup_sysctl’:
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:130:27: error: implicit declaration of function ‘register_sysctl_table’; did you mean ‘unregister_sysctl_table’? [-Werror=implicit-function-declaration]
130 | llwmi_sysctl_header = register_sysctl_table(llwmi_root_table);
| ^~~~~~~~~~~~~~~~~~~~~
| unregister_sysctl_table
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.c:130:25: warning: assignment to ‘struct ctl_table_header *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
130 | llwmi_sysctl_header = register_sysctl_table(llwmi_root_table);
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:243: /var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/lenovo-legion-wmi.o] Error 1
make[1]: *** [/usr/lib/modules/6.7.6-arch1-1/build/Makefile:1911: /var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build] Error 2
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/usr/lib/modules/6.7.6-arch1-1/build'
Error when cloning the repository and manually building the kernel module using sudo make all:
make -C /lib/modules/6.7.6-arch1-1/build M=lenovo-legion-wmi modules
make[1]: Entering directory '/usr/lib/modules/6.7.6-arch1-1/build'
scripts/Makefile.build:41: lenovo-legion-wmi/Makefile: No such file or directory
make[3]: *** No rule to make target 'lenovo-legion-wmi/Makefile'. Stop.
make[2]: *** [/usr/lib/modules/6.7.6-arch1-1/build/Makefile:1911: lenovo-legion-wmi] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.7.6-arch1-1/build'
make: *** [Makefile:5: all] Error 2
The build fails both when using AUR package and when building manually.
Log from the AUR package at
/var/lib/dkms/lenovo-legion-wmi/r4.c25ebd4/build/make.log
:Error when cloning the repository and manually building the kernel module using
sudo make all
: