ProblemType: Package DKMSBuildLog: DKMS make.log for tp_smapi-0.43 for kernel 6.5.0-5-generic (x86_64) Thu Sep 14 09:00:27 AM +08 2023 make: Entering directory '/usr/src/linux-headers-6.5.0-5-generic' warning: the compiler differs from the one used to build the kernel The kernel was built by: x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-3ubuntu1) 13.2.0 You are using: gcc-13 (Ubuntu 13.2.0-3ubuntu1) 13.2.0 CC [M] /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.o CC [M] /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o CC [M] /var/lib/dkms/tp_smapi/0.43/build/hdaps.o /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:42: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given 94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex); | ^ In file included from /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:45: ./include/linux/semaphore.h:34: note: macro "DEFINE_SEMAPHORE" defined here 34 | #define DEFINE_SEMAPHORE(_name, _n) \ | /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:8: error: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’ [-Werror=implicit-int] 94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex); | ^~~~~~~~~~~~~~~~ /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function ‘thinkpad_ec_lock’: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:112:35: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean ‘thinkpad_ec_lock’? 112 | ret = down_interruptible(&thinkpad_ec_mutex); | ^~~~~~~~~~~~~~~~~ | thinkpad_ec_lock /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:112:35: note: each undeclared identifier is reported only once for each function it appears in /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function ‘thinkpad_ec_try_lock’: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:126:30: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean ‘thinkpad_ec_lock’? 126 | return down_trylock(&thinkpad_ec_mutex); | ^~~~~~~~~~~~~~~~~ | thinkpad_ec_lock /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function ‘thinkpad_ec_unlock’: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:138:13: error: ‘thinkpad_ec_mutex’ undeclared (first use in this function); did you mean ‘thinkpad_ec_lock’? 138 | up(&thinkpad_ec_mutex); | ^~~~~~~~~~~~~~~~~ | thinkpad_ec_lock /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: In function ‘thinkpad_ec_try_lock’: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:127:1: error: control reaches end of non-void function [-Werror=return-type] 127 | } | ^ /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c: At top level: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:8: warning: ‘DEFINE_SEMAPHORE’ defined but not used [-Wunused-variable] 94 | static DEFINE_SEMAPHORE(thinkpad_ec_mutex); | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.o] Error 1 make[2]: *** Waiting for unfinished jobs.... /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:36: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given 115 | static DEFINE_SEMAPHORE(smapi_mutex); | ^ In file included from ./include/linux/fs.h:25, from ./include/linux/proc_fs.h:10, from /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:41: ./include/linux/semaphore.h:34: note: macro "DEFINE_SEMAPHORE" defined here 34 | #define DEFINE_SEMAPHORE(_name, _n) \ | /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:8: error: type defaults to ‘int’ in declaration of ‘DEFINE_SEMAPHORE’ [-Werror=implicit-int] 115 | static DEFINE_SEMAPHORE(smapi_mutex); | ^~~~~~~~~~~~~~~~ /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: In function ‘store_battery_start_charge_thresh’: /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:780:15: error: ‘smapi_mutex’ undeclared (first use in this function) 780 | down(&smapi_mutex); | ^~~~~~~~~~~ /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:780:15: note: each undeclared identifier is reported only once for each function it appears in /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: In function ‘store_battery_stop_charge_thresh’: /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:822:15: error: ‘smapi_mutex’ undeclared (first use in this function) 822 | down(&smapi_mutex); | ^~~~~~~~~~~ /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c: At top level: /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.c:115:8: warning: ‘DEFINE_SEMAPHORE’ defined but not used [-Wunused-variable] 115 | static DEFINE_SEMAPHORE(smapi_mutex); | ^~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:251: /var/lib/dkms/tp_smapi/0.43/build/tp_smapi.o] Error 1 make[1]: *** [/usr/src/linux-headers-6.5.0-5-generic/Makefile:2037: /var/lib/dkms/tp_smapi/0.43/build] Error 2 make: *** [Makefile:234: __sub-make] Error 2 make: Leaving directory '/usr/src/linux-headers-6.5.0-5-generic' DKMSKernelVersion: 6.5.0-5-generic Date: Thu Sep 14 09:00:30 2023 DuplicateSignature: dkms:tp-smapi-dkms:0.43-1ubuntu1:/var/lib/dkms/tp_smapi/0.43/build/thinkpad_ec.c:94:42: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given Package: tp-smapi-dkms 0.43-1ubuntu1 PackageVersion: 0.43-1ubuntu1 SourcePackage: tp-smapi Title: tp-smapi-dkms 0.43-1ubuntu1: tp_smapi kernel module failed to build