gpstime dkms build failure on debian bullseye, 5.10.0-11 kernel
Building module:
cleaning build area...
make -j10 KERNELRELEASE=5.10.0-11-amd64 -C /lib/modules/5.10.0-11-amd64/build M=/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.10.0-11-amd64 (x86_64)
Consult /var/lib/dkms/gpstime/4.2.7/build/make.log for more information.
eve:~ 0# cat /var/lib/dkms/gpstime/4.2.7/build/make.log
DKMS make.log for gpstime-4.2.7 for kernel 5.10.0-11-amd64 (x86_64)
Mon 21 Feb 2022 08:34:23 AM PST
make: Entering directory '/usr/src/linux-headers-5.10.0-11-amd64'
CC [M] /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.o
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:39:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/spectracomGPS.c: In function ‘spectracomGpsInitCheckSync’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/spectracomGPS.c:43:29: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
43 | addr1 = (unsigned char*)ioremap_nocache( (unsigned long)pci_io_addr, 0x30 );
| ^~~~~~~~~~~~~~~
| ioremap_cache
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/spectracomGPS.c:43:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
43 | addr1 = (unsigned char*)ioremap_nocache( (unsigned long)pci_io_addr, 0x30 );
| ^
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:40:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/symmetricomGps.c: In function ‘symmetricomGpsInit’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/symmetricomGps.c:24:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
24 | addr1 = (unsigned char*)ioremap_nocache( (unsigned long)pci_io_addr, 0x40 );
| ^
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/symmetricomGps.c:34:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
34 | (unsigned char*)ioremap_nocache( (unsigned long)pci_io_addr, 0x200 );
| ^
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:41:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/ligoPcieTiming_core.c: In function ‘lptcInit’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/../../include/drv/ligoPcieTiming_core.c:33:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
33 | addr = (char*)ioremap_nocache( (unsigned long)pci_io_addr, 0x2000 );
| ^
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c: At top level:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:79:10: error: ‘struct file_operations’ has no member named ‘ioctl’
79 | .ioctl = symmetricom_ioctl,
| ^~~~~
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:79:18: error: positional initialization of field in ‘struct’ declared with ‘designated_init’ attribute [-Werror=designated-init]
79 | .ioctl = symmetricom_ioctl,
| ^~~~~~~~~~~~~~~~~
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:79:18: note: (near initialization for ‘symmetricom_fops’)
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:79:18: error: initialization of ‘int (*)(struct file *, loff_t, loff_t, int)’ {aka ‘int (*)(struct file *, long long int, long long int, int)’} from incompatible pointer type ‘int (*)(struct inode *, struct file *, unsigned int, long unsigned int)’ [-Werror=incompatible-pointer-types]
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:79:18: note: (near initialization for ‘symmetricom_fops.fsync’)
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c: In function ‘get_cur_time’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:118:25: error: storage size of ‘t’ isn’t known
118 | struct timespec t;
| ^
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:120:13: error: invalid use of undefined type ‘struct timespec’
120 | t = current_kernel_time();
| ^~~~~~~~~~~~~~~~~~~
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:118:25: warning: unused variable ‘t’ [-Wunused-variable]
118 | struct timespec t;
| ^
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:367:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/lptc_sysfs.c: In function ‘lptc_sysfs_internal_pwr_show’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/lptc_sysfs.c:128:9: warning: unused variable ‘i’ [-Wunused-variable]
128 | int i, numc;
| ^
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c: In function ‘symmetricom_init’:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:403:75: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
403 | proc_gps_entry = proc_create("gps", PROC_MODE | S_IFREG | S_IRUGO, NULL, &gps_file_ops);
| ^~~~~~~~~~~~~
| |
| struct file_operations *
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:23:
/usr/src/linux-headers-5.10.0-11-common/include/linux/proc_fs.h:109:122: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
109 | struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
In file included from /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.c:367:
At top level:
/var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/lptc_sysfs.c:13:16: warning: ‘lptc_sysfs_bpconfig_show’ defined but not used [-Wunused-function]
13 | static ssize_t lptc_sysfs_bpconfig_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-5.10.0-11-common/scripts/Makefile.build:285: /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime/gpstime.o] Error 1
make[1]: *** [/usr/src/linux-headers-5.10.0-11-common/Makefile:1846: /var/lib/dkms/gpstime/4.2.7/build/drv/gpstime] Error 2
make: *** [/usr/src/linux-headers-5.10.0-11-common/Makefile:185: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-5.10.0-11-amd64'
Edited by Jameson Rollins