Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to complile due to apic undeclared #4

Open
huzhifeng opened this issue Apr 6, 2022 · 1 comment
Open

failed to complile due to apic undeclared #4

huzhifeng opened this issue Apr 6, 2022 · 1 comment

Comments

@huzhifeng
Copy link

  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]$
@makelinux
Copy link
Owner

Fixed. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants