testing/ddcci-driver-linux-src: fails to build with akms
With ddcci-driver-linux-src
installed:
> doas apk fix akms
(1/1) Reinstalling akms (0.2.0-r0)
Executing busybox-1.36.1-r5.trigger
Executing akms-0.2.0-r0.trigger
akms: Building module ddcci-driver-linux/0.4.3-r0 for kernel 6.4.10-0-edge
(1/8) Installing gmp-dev (6.3.0-r0)
(2/8) Installing elfutils-dev (0.189-r3)
(3/8) Installing flex (2.6.4-r6)
(4/8) Installing bison (3.8.2-r1)
(5/8) Installing linux-edge-dev (6.4.10-r0)
(6/8) Installing .akms-build (20230813.092610)
(7/8) Installing bison-doc (3.8.2-r1)
(8/8) Installing flex-doc (2.6.4-r6)
OK: 10689 MiB in 2671 packages
CC [M] /var/lib/akms/6.4.10-0-edge/ddcci-driver-linux/0.4.3-r0/build/ddcci/ddcci.o
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:42:34: error: macro "DEFINE_SEMAPHORE" requires 2 arguments, but only 1 given
42 | static DEFINE_SEMAPHORE(core_lock);
| ^
In file included from ./include/linux/fs.h:25,
from /usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:19:
./include/linux/semaphore.h:34: note: macro "DEFINE_SEMAPHORE" defined here
34 | #define DEFINE_SEMAPHORE(_name, _n) \
|
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:42:8: error: type defaults to 'int' in declaration of 'DEFINE_SEMAPHORE' [-Werror=implicit-int]
42 | static DEFINE_SEMAPHORE(core_lock);
| ^~~~~~~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c: In function 'ddcci_device_release':
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:998:23: error: 'core_lock' undeclared (first use in this function); did you mean 'file_lock'?
998 | down(&core_lock);
| ^~~~~~~~~
| file_lock
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:998:23: note: each undeclared identifier is reported only once for each function it appears in
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c: At top level:
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1049:27: error: initialization of 'int (*)(const struct device *, struct kobj_uevent_env *)' from incompatible pointer type 'int (*)(struct device *, struct kobj_uevent_env *)' [-Werror=incompatible-pointer-types]
1049 | .uevent = ddcci_device_uevent,
| ^~~~~~~~~~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1049:27: note: (near initialization for 'ddcci_device_type.uevent')
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1052:27: error: initialization of 'char * (*)(const struct device *, umode_t *, kuid_t *, kgid_t *)' {aka 'char * (*)(const struct device *, short unsigned int *, kuid_t *, kgid_t *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *, kuid_t *, kgid_t *)' {aka 'char * (*)(struct device *, short unsigned int *, kuid_t *, kgid_t *)'} [-Werror=incompatible-pointer-types]
1052 | .devnode = ddcci_devnode
| ^~~~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1052:27: note: (near initialization for 'ddcci_device_type.devnode')
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1058:27: error: initialization of 'int (*)(const struct device *, struct kobj_uevent_env *)' from incompatible pointer type 'int (*)(struct device *, struct kobj_uevent_env *)' [-Werror=incompatible-pointer-types]
1058 | .uevent = ddcci_device_uevent,
| ^~~~~~~~~~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1058:27: note: (near initialization for 'ddcci_dependent_type.uevent')
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1061:27: error: initialization of 'char * (*)(const struct device *, umode_t *, kuid_t *, kgid_t *)' {aka 'char * (*)(const struct device *, short unsigned int *, kuid_t *, kgid_t *)'} from incompatible pointer type 'char * (*)(struct device *, umode_t *, kuid_t *, kgid_t *)' {aka 'char * (*)(struct device *, short unsigned int *, kuid_t *, kgid_t *)'} [-Werror=incompatible-pointer-types]
1061 | .devnode = ddcci_dependent_devnode
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1061:27: note: (near initialization for 'ddcci_dependent_type.devnode')
In file included from ./include/linux/build_bug.h:5,
from ./include/linux/container_of.h:5,
from ./include/linux/list.h:5,
from ./include/linux/kobject.h:19,
from ./include/linux/cdev.h:5,
from /usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:16:
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c: In function 'ddcci_register_driver':
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1103:46: error: 'struct bus_type' has no member named 'p'; did you mean 'pm'?
1103 | if (unlikely(WARN_ON(!ddcci_bus_type.p)))
| ^
./include/linux/compiler.h:77:45: note: in definition of macro 'unlikely'
77 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1103:22: note: in expansion of macro 'WARN_ON'
1103 | if (unlikely(WARN_ON(!ddcci_bus_type.p)))
| ^~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c: In function 'ddcci_detect_device':
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1584:15: error: 'core_lock' undeclared (first use in this function); did you mean 'file_lock'?
1584 | down(&core_lock);
| ^~~~~~~~~
| file_lock
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c: At top level:
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1815:27: error: initialization of 'int (*)(struct i2c_client *)' from incompatible pointer type 'int (*)(struct i2c_client *, const struct i2c_device_id *)' [-Werror=incompatible-pointer-types]
1815 | .probe = ddcci_probe,
| ^~~~~~~~~~~
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:1815:27: note: (near initialization for 'ddcci_driver.<anonymous>.probe')
/usr/src/ddcci-driver-linux-0.4.3/ddcci/ddcci.c:42:8: warning: 'DEFINE_SEMAPHORE' defined but not used [-Wunused-variable]
42 | static DEFINE_SEMAPHORE(core_lock);
| ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:252: /var/lib/akms/6.4.10-0-edge/ddcci-driver-linux/0.4.3-r0/build/ddcci/ddcci.o] Error 1
make: *** [Makefile:2032: /var/lib/akms/6.4.10-0-edge/ddcci-driver-linux/0.4.3-r0/build/ddcci] Error 2
akms: ERROR: Failed to build module ddcci-driver-linux/0.4.3-r0 for 6.4.10-0-edge
akms: ERROR: examine /var/lib/akms/6.4.10-0-edge/ddcci-driver-linux/0.4.3-r0/build