rlalik opened issue #1: Problem compiling agains 6.8.0 kernel at Wojciech Zabołotny / wzdaq_drv

rlalik
2024-12-05T16:15:59Z

Hi Wojtek,

when compiling on my Ubuntu 22.04 with 6.8.0-49 kernel, I have following issue (error and some warnings):

make: Entering directory '/usr/src/linux-headers-6.8.0-49-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-23ubuntu4) 13.2.0
You are using: gcc-13 (Ubuntu 13.2.0-23ubuntu4) 13.2.0
CC [M] /home/cbm/projects/wzdaq_drv/src/wzdaq_drv.o
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:134:13: warning: no previous prototype for ‘daq1_irq’ [-Wmissing-prototypes]
134 | irqreturn_t daq1_irq(int irq, void * dev_id)
| ^~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:164:10: warning: no previous prototype for ‘daq1_poll’ [-Wmissing-prototypes]
164 | __poll_t daq1_poll(struct file *filp,poll_table *wait)
| ^~~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:311:6: warning: no previous prototype for ‘daq1_remove’ [-Wmissing-prototypes]
311 | void daq1_remove(struct pci_dev *pdev )
| ^~~~~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:427:5: warning: no previous prototype for ‘sgl_map’ [-Wmissing-prototypes]
427 | int sgl_map(struct daq1_device * ddev, const char __user *buf, size_t count)
| ^~~~~~~
In file included from /home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:37:
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c: In function ‘daq1_ioctl’:
/home/cbm/projects/wzdaq_drv/src/wzab_daq1.h:87:27: error: ‘XDMA1_CONTROL_DEPTH_BUFS’ undeclared (first use in this function); did you mean ‘XDMA1_CONTROL_DEPTH_BUFS_V’?
87 | #define DAQ1_MAX_NOF_BUFS XDMA1_CONTROL_DEPTH_BUFS
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:728:20: note: in expansion of macro ‘DAQ1_MAX_NOF_BUFS’
728 | if(nofhp > DAQ1_MAX_NOF_BUFS)
| ^~~~~~~~~~~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzab_daq1.h:87:27: note: each undeclared identifier is reported only once for each function it appears in
87 | #define DAQ1_MAX_NOF_BUFS XDMA1_CONTROL_DEPTH_BUFS
| ^~~~~~~~~~~~~~~~~~~~~~~~
/home/cbm/projects/wzdaq_drv/src/wzdaq_drv.c:728:20: note: in expansion of macro ‘DAQ1_MAX_NOF_BUFS’
728 | if(nofhp > DAQ1_MAX_NOF_BUFS)
| ^~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:243: /home/cbm/projects/wzdaq_drv/src/wzdaq_drv.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.8.0-49-generic/Makefile:1925: /home/cbm/projects/wzdaq_drv/src] Error 2
make: *** [Makefile:240: __sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-6.8.0-49-generic'