Asterisk Installation - DAHDI make error


I am trying to install and Build DAHDI during Asterisk installation on Rocky9.

I have downloaded the binary file via this command.


Then extracted the tarball with this command.

tar -xvzf dahdi-linux-complete-current.tar.gz

Then changed to the dahdi directory

 cd dahdi-linux-complete-3.2.0+3.2.0/

But when i make the file as root user, i get the error below.

$ sudo make
[sudo] password for jil:
make -C linux all
make[1]: Entering directory '/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux'
make -C drivers/dahdi/firmware firmware-loaders
make[2]: Entering directory '/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/firmware'
make[2]: Leaving directory '/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/firmware'
make -C /lib/modules/5.14.0-162.23.1.el9_1.x86_64/build M=/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi DAHDI_INCLUDE=/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/include DAHDI_MODULES_EXTRA=" " HOTPLUG_FIRMWARE=yes modules DAHDI_BUILD_ALL=m
make[2]: Entering directory '/usr/src/kernels/5.14.0-162.23.1.el9_1.x86_64'
  CC [M]  /home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.o
/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c:49:10: fatal error: stdbool.h: No such file or directory
   **49 | #include <stdbool.h>**
      |          ^~~~~~~~~~~
compilation terminated.
make[4]: *** [scripts/ /home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.o] Error 1
make[3]: *** [scripts/ /home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp] Error 2
make[2]: *** [Makefile:1915: /home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi] Error 2
make[2]: Leaving directory '/usr/src/kernels/5.14.0-162.23.1.el9_1.x86_64'
make[1]: *** [Makefile:74: modules] Error 2
make[1]: Leaving directory '/home/jil/Downloads/dahdi-linux-complete-3.2.0+3.2.0/linux'
make: *** [Makefile:9: all] Error 2

I have tried to do a simple google search but i seem not to find a way out.

Please assist on what i might be missing.

The log states you are missing this header. Install the appropriate package that has this header and this error will go away.

I have not been lucky with this.

Hello Sir.

I am still trying to crack this one.

Please help me get over this. I have tried a few things.

dnf provides */stdbool.h

This command gives a huge list.

$ dnf list *dahdi*
Last metadata expiration check: 0:57:27 ago on Thu 18 May 2023 09:56:38 PM EAT.
Installed Packages
asterisk-dahdi.x86_64                     18.12.1-1.el9.1                  @epel
dahdi-tools.x86_64                        2.11.1-28.el9                    @epel
dahdi-tools-devel.x86_64                  2.11.1-28.el9                    @epel
dahdi-tools-libs.x86_64                   2.11.1-28.el9                    @epel

Am stuck at this point. Please teach how am to continue from there.
3. If i try to edit the file:

$ sudo vim /usr/local/src/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/base.c

Contents of the file

#include <linux/crc32.h>
#include <linux/slab.h>

/* Linux kernel 5.16 and greater has removed user-space headers from the kernel include path */
#include <asm/types.h>
#include <stdbool.h>

#include <dahdi/kernel.h>

#include "wct4xxp.h"
#include "vpm450m.h"

/* Support first generation cards? */
#define SUPPORT_GEN1 

I locate the

#include <stdbool.h>

But i dont know how to treat this. Please show me.


A Google search found this:

Suggests there may be a bug the in the current release of dahdi, the link does include some work a rounds though.

Regards Tom.

Hello tjdoyle.

Let me have a look and revert.

Thank you.

I have tried it out. Getting the same error.

Not sure what else am to do.

Let me see if Asterisk has a forum I raise it with them.

The answer is to change the name. From stdbool.h to " linux/types.h " in each of the files with that name.


I confirmed rppmbuild and run dahdi ok only on Rocky9.2 as kernel-5.14.0-284.11.1.


Whole sources should be change to #include <linux/types.h> from #include <stdbool.h> as below.
diff -Nurdp dahdi-linux-3.2.0/drivers/dahdi/dahdi-base.c dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/dahdi-base.c
— dahdi-linux-3.2.0/drivers/dahdi/dahdi-base.c 2023-08-15 21:56:09.000000000 +0900
+++ dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/dahdi-base.c 2023-09-19 17:06:50.678162352 +0900
@@ -86,7 +86,7 @@
#include <asm/types.h>
-#include <stdbool.h>
+#include <linux/types.h>

#if defined(EMPULSE) && defined(EMFLASH)
diff -Nurdp dahdi-linux-3.2.0/drivers/dahdi/voicebus/vpmoct.h dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/voicebus/vpmoct.h
— dahdi-linux-3.2.0/drivers/dahdi/voicebus/vpmoct.h 2023-08-15 21:56:09.000000000 +0900
+++ dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/voicebus/vpmoct.h 2023-09-19 17:06:50.678162352 +0900
@@ -34,7 +34,7 @@
#include <asm/types.h>
-#include <stdbool.h>
+#include <linux/types.h>

diff -Nurdp dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/wctc4xxp/base.c
— dahdi-linux-3.2.0/drivers/dahdi/wctc4xxp/base.c 2023-08-15 21:56:09.000000000 +0900
+++ dahdi-linux-3.2.0_kernel-5.14.0-284.11.1.el9_2/drivers/dahdi/wctc4xxp/base.c 2023-09-19 17:06:50.681162256 +0900
@@ -44,7 +44,7 @@
#include <asm/types.h>
-#include <stdbool.h>
+#include <linux/types.h>

netif_napi_add needs change the param.
@@ -658,7 +658,7 @@ wctc4xxp_net_register(struct wcdte *wc)
netdev->promiscuity = 0;
netdev->flags |= IFF_NOARP;

  • netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll, 64);
  • netif_napi_add(netdev, &wc->napi, &wctc4xxp_poll);

    res = register_netdev(netdev);
    if (res) {

I hope this helps for you.