I can't manage to build the peak linux driver.
Can you please help me on this one ?
below, the output of the make command :
Code: Select all
make[1]: Entering directory '/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver'
***
*** Making pcan driver in chardev mode
***
*** Host OS Release=Fedora Linux v38
*** Host machine kernel version=6.5.10-200.fc38.x86_64
*** Driver kernel version=6.5.10-200.fc38.x86_64 (6.5.10)
*** Path to kernel sources=/lib/modules/6.5.10-200.fc38.x86_64/build
*** use KBUILD=yes
*** use DKMS=
*** gcc version=13
***
make -C /lib/modules/6.5.10-200.fc38.x86_64/build EXTRA_CFLAGS="-I/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver -DNO_DEBUG -DMODVERSIONS -DNO_PARPORT_SUBSYSTEM -DUSB_SUPPORT -DPCI_SUPPORT -DPCIEC_SUPPORT -DISA_SUPPORT -DNO_DONGLE_SUPPORT -DNO_PCCARD_SUPPORT -DNO_NETDEV_SUPPORT -DNO_RT -Wno-date-time" V=0 modules M=/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver
make[2]: Entering directory '/usr/src/kernels/6.5.10-200.fc38.x86_64'
CC [M] /home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.o
In file included from ./include/linux/kobject.h:20,
from ./include/linux/module.h:21,
from /home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_common.h:48,
from /home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:36:
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3506:22: error: initialization of ‘ssize_t (*)(const struct class *, const struct class_attribute *, char *)’ {aka ‘long int (*)(const struct class *, const struct class_attribute *, char *)’} from incompatible pointer type ‘ssize_t (*)(struct class *, struct class_attribute *, char *)’ {aka ‘long int (*)(struct class *, struct class_attribute *, char *)’} [-Werror=incompatible-pointer-types]
3506 | static CLASS_ATTR_RO(version);
| ^~~~~~~
./include/linux/sysfs.h:117:19: note: in definition of macro ‘__ATTR_RO’
117 | .show = _name##_show, \
| ^~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3506:8: note: in expansion of macro ‘CLASS_ATTR_RO’
3506 | static CLASS_ATTR_RO(version);
| ^~~~~~~~~~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3506:22: note: (near initialization for ‘class_attr_version.show’)
3506 | static CLASS_ATTR_RO(version);
| ^~~~~~~
./include/linux/sysfs.h:117:19: note: in definition of macro ‘__ATTR_RO’
117 | .show = _name##_show, \
| ^~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3506:8: note: in expansion of macro ‘CLASS_ATTR_RO’
3506 | static CLASS_ATTR_RO(version);
| ^~~~~~~~~~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3507:22: error: initialization of ‘ssize_t (*)(const struct class *, const struct class_attribute *, char *)’ {aka ‘long int (*)(const struct class *, const struct class_attribute *, char *)’} from incompatible pointer type ‘ssize_t (*)(struct class *, struct class_attribute *, char *)’ {aka ‘long int (*)(struct class *, struct class_attribute *, char *)’} [-Werror=incompatible-pointer-types]
3507 | static CLASS_ATTR_RO(clk_ref);
| ^~~~~~~
./include/linux/sysfs.h:117:19: note: in definition of macro ‘__ATTR_RO’
117 | .show = _name##_show, \
| ^~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3507:8: note: in expansion of macro ‘CLASS_ATTR_RO’
3507 | static CLASS_ATTR_RO(clk_ref);
| ^~~~~~~~~~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3507:22: note: (near initialization for ‘class_attr_clk_ref.show’)
3507 | static CLASS_ATTR_RO(clk_ref);
| ^~~~~~~
./include/linux/sysfs.h:117:19: note: in definition of macro ‘__ATTR_RO’
117 | .show = _name##_show, \
| ^~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:3507:8: note: in expansion of macro ‘CLASS_ATTR_RO’
3507 | static CLASS_ATTR_RO(clk_ref);
| ^~~~~~~~~~~~~
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c: In function ‘init_module’:
/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.c:4813:9: warning: ignoring return value of ‘class_register’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
4813 | class_register(&pcan_class);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[4]: *** [scripts/Makefile.build:243: /home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver/src/pcan_main.o] Error 1
make[3]: *** [/usr/src/kernels/6.5.10-200.fc38.x86_64/Makefile:2046: /home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver] Error 2
make[2]: *** [Makefile:246: __sub-make] Error 2
make[2]: Leaving directory '/usr/src/kernels/6.5.10-200.fc38.x86_64'
make[1]: *** [Makefile:523: all] Error 2
make[1]: Leaving directory '/home/lemaire/code/pcan/peak-linux-driver-8.16.0/driver'
make: *** [Makefile:84: all] Error 2