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

Can't compile with latest CentOS Kernel 4.18.0-490 - netif_napi_add issue #19

Open
dbray925 opened this issue May 12, 2023 · 5 comments

Comments

@dbray925
Copy link

OS: CentOS
Kernel: 4.18.0-490
Version: 3.2.0

Issue:
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.c: In function ‘wctc4xxp_net_register’:
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.c:697:54: error: macro "netif_napi_add" passed 4 arguments, but takes just 3
netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
^
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.c:697:2: error: ‘netif_napi_add’ undeclared (first use in this function); did you mean ‘netif_napi_del’?
netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
^~~~~~~~~~~~~~
netif_napi_del
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.c:697:2: note: each undeclared identifier is reported only once for each function it appears in
At top level:
/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.c:583:1: warning: ‘wctc4xxp_poll’ defined but not used [-Wunused-function]
wctc4xxp_poll(struct napi_struct *napi, int budget)
^~~~~~~~~~~~~
make[4]: *** [scripts/Makefile.build:318: /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp/base.o] Error 1
make[3]: *** [scripts/Makefile.build:558: /usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wctc4xxp] Error 2
make[2]: *** [Makefile:1616: module/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi] Error 2
make[2]: Leaving directory '/usr/src/kernels/4.18.0-490.el8.x86_64'
make[1]: *** [Makefile:74: modules] Error 2
make[1]: Leaving directory '/usr/src/dahdi-linux-complete-3.2.0+3.2.0/linux'
make: *** [Makefile:9: all] Error 2

@dbray925
Copy link
Author

Work around is to install older kernel:

sudo dnf install -y kernel-4.18.0-408.el8.x86_64.rpm kernel-devel-4.18.0-448.el8.x86_64 kernel-headers-4.18.0-448.el8.x86_64
sudo reboot

sudo dnf -y remove kernel-tools-4.18.0-490.el8.x86_64 kernel-modules-4.18.0-490.el8.x86_64 kernel-tools-libs-4.18.0-490.el8.x86_64 kernel-4.18.0-490.el8.x86_64 kernel-core-4.18.0-490.el8.x86_64 kernel-devel-4.18.0-490.el8.x86_64

sudo vim /etc/dnf/dnf.conf
exclude=asterisk kernel*

@InterLinked1
Copy link
Contributor

netif_napi_add

Thanks for reporting this. DAHDI is currently broken on newer kernels due to Sangoma's incompetence at maintaining it. I suggest you file a complaint with Sangoma sales and technical support about this. You're not going to get any official help here.

You could also try installing DAHDI using PhreakScript[1], which has a ton of compiler fixes that don't exist upstream. I'm not sure if this one is present though yet; if not, we'll try to get that fixed.

[1] https://github.com/InterLinked1/phreakscript

@laf0rge
Copy link
Contributor

laf0rge commented May 12, 2023

You also might want to give https://gitea.osmocom.org/retronetworking/dahdi-linux a try. It is known (and continuously verified to build against) kernel v4.19. As your target (v4.18) is not far from it, so you might be lucky.

@InterLinked1
Copy link
Contributor

@push143smart This issue was resolved by merge of a759a57 and can be closed

@wadester
Copy link

a759a57 seems to only fix for version 6 kernels, not 4.18.0-xxx on RHEL 8.8/AlmaLinux/RockyLinux.
Add #define netif_napi_add netif_napi_add_weight to kernel.h without the ifdef.

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

4 participants