Open rodolfojcj opened 11 months ago
Don't use the tarballs, those are all woefully obsolete and not up to date.
I'd recommend either installing from Git (master branch), and if that still doesn't work, you could try installing using PhreakScript: https://github.com/InterLinked1/phreakscript
I have the hypothesis that Red Hat backported some Linux kernel changes from upstream version 5.16 to its long supported RHEL 5.14 version, which means that it has some functionalities of 5.16, like not including the stdbool.h file when compiling Linux kernel modules, but the DAHDI 3.2.0+3.2.0 building process "thinks" that the running kernel is 5.14 and will insist in using stdbool.h.
That hypothesis is based on these:
This comment:
This is due to an intentional change in Linux 5.16 removing user-space headers from the kernel include path:
https://git.kernel.org/linus/04e85bbf71c9072dcf0ad9a7150495d72461105c.
Kernel code must use <linux/types.h> instead of
found at https://groups.google.com/g/linux.debian.bugs.dist/c/NQP3JCZN3qc and its related links https://17797152399858172281.googlegroups.com/attach/4ddc51bad3099/dahdi-do-not-use-stdbool.h-in-kernel-modules.patch?part=0.1&view=1&vt=ANaJVrEuBiYFknoIoIGYSMOsAuIxwr1nvzttLqLid73ViGt9_e4PKyGzqF2xJlipN5ClZEWf8EQw-EDwnXLzQ15Sc0PNfcStM8dUMXGqNnwlZo_Nheo9NMQ , https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=04e85bbf71c9072dcf0ad9a7150495d72461105c , https://github.com/torvalds/linux/commit/6060a6cb05e3223146a3c30a1977f136da6c85e7 and https://github.com/torvalds/linux/commit/04e85bbf71c9072dcf0ad9a7150495d72461105c
The RHEL release dates published at https://access.redhat.com/articles/3078 shows:
Red Hat Enterprise Linux 9 Release General Availability Date redhat-release Errata Date* Kernel Version RHEL 9.2 2023-05-10 2023-05-09 RHBA-2023:2455 5.14.0-284.11.1.el9_2 RHEL 9.1 2022-11-15 2022-11-15 RHBA-2022:8264 5.14.0-162.6.1.el9_1 RHEL 9.0 2022-05-17 2022-05-17 RHBA-2022:3893 5.14.0-70.13.1.el9_0
From them I found this Rocky Linux 9.0, 9.1 and 9.2 kernel-devel packages:
https://download.rockylinux.org/vault/rocky/9.0/devel/x86_64/os/Packages/k/kernel-devel-5.14.0-70.30.1.el9_0.x86_64.rpm
https://download.rockylinux.org/vault/rocky/9.1/devel/x86_64/os/Packages/k/kernel-devel-5.14.0-162.23.1.el9_1.x86_64.rpm
https://dl.rockylinux.org/pub/rocky/9/devel/x86_64/os/Packages/k/kernel-devel-5.14.0-284.25.1.el9_2.x86_64.rpm # this is 9.2 as of August 2023
I reviewed their contents, observing that for RL 9.0 its file /usr/src/kernels/5.14.0-70.30.1.el9_0.x86_64/Makefile does not have the Linux kernel change mentioned before, but RL 9.1 file /usr/src/kernels/5.14.0-162.23.1.el9_1.x86_64/Makefile and RL 9.2 file /usr/src/kernels/5.14.0-284.25.1.el9_2.x86_64/Makefile have it. Given this difference, I pressume that compiling DAHDI 3.2.0 on RL 9.0 will not give the stdbool.h related error.
I have the hypothesis that Red Hat backported some Linux kernel changes from upstream version 5.16 to its long supported RHEL 5.14 version, which means that it has some functionalities of 5.16, like not including the stdbool.h file when compiling Linux kernel modules, but the DAHDI 3.2.0+3.2.0 building process "thinks" that the running kernel is 5.14 and will insist in using stdbool.h.
This was already fixed for 5.16+ kernels[1], I just don't think there's a tarball that includes this change, hence my previous comment.
The check is simply #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0)
so it'd be odd if anything funky was going on.
[1] https://github.com/asterisk/dahdi-linux/commit/ca23e736942c53a621dad1bbb57dc4c966d6a84a
The attached file dahdi-linux-issue-36-fix-24sept2023.zip has a possible fix to this issue.
I tested it with:
In all those cases the compilation is successful.
Thanks in advance for any developer of this project that may review and possibly apply this fix for the master branch.
When using the DAHDI linux complete 3.2.0 tar.gz file, trying to compile on Rocky Linux 9.2 fails with error messages like these:
The running Linux kernel version looks like this: