ldt icon indicating copy to clipboard operation
ldt copied to clipboard

failed to complile due to apic undeclared

Open huzhifeng opened this issue 2 years ago • 1 comments

  1. CentOS 7.9
[root@centos ldt]# make
make -C /lib/modules/3.10.0-1160.el7.x86_64/build M=$PWD modules
make[1]: Entering directory `/usr/src/kernels/3.10.0-1160.el7.x86_64'
  CC [M]  /root/ldt/misc_loop_drv.o
/root/ldt/misc_loop_drv.c: In function ‘misc_loop_drv_tasklet_func’:
/root/ldt/misc_loop_drv.c:124:3: error: implicit declaration of function ‘ISA_IRQ_VECTOR’ [-Werror=implicit-function-declaration]
   apic->send_IPI_all(ISA_IRQ_VECTOR(irq));
   ^
cc1: some warnings being treated as errors
make[2]: *** [/root/ldt/misc_loop_drv.o] Error 1
make[1]: *** [_module_/root/ldt] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.10.0-1160.el7.x86_64'
make: *** [modules] Error 2
[root@centos ldt]#
  1. Fedora 35
[huzhifeng@fedora35 ldt]$ make
make -C /lib/modules/5.15.7-200.fc35.x86_64/build M=$PWD modules
make[1]: Entering directory '/usr/src/kernels/5.15.7-200.fc35.x86_64'
  CC [M]  /home/huzhifeng/Downloads/ldt/misc_loop_drv.o
/home/huzhifeng/Downloads/ldt/misc_loop_drv.c: In function ‘misc_loop_drv_tasklet_func’:
/home/huzhifeng/Downloads/ldt/misc_loop_drv.c:124:17: error: ‘apic’ undeclared (first use in this function)
  124 |                 apic->send_IPI_all(ISA_IRQ_VECTOR(irq));
      |                 ^~~~
/home/huzhifeng/Downloads/ldt/misc_loop_drv.c:124:17: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:277: /home/huzhifeng/Downloads/ldt/misc_loop_drv.o] Error 1
make[1]: *** [Makefile:1872: /home/huzhifeng/Downloads/ldt] Error 2
make[1]: Leaving directory '/usr/src/kernels/5.15.7-200.fc35.x86_64'
make: *** [Makefile:26: modules] Error 2
[huzhifeng@fedora35 ldt]$

huzhifeng avatar Apr 06 '22 06:04 huzhifeng

Fixed. Thank you!

makelinux avatar Apr 13 '22 10:04 makelinux