"fatal error:" stdbool.h no such file or directory

I’m trying to install dahdi, but get this error:
/usr/src/asterisk/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/wct4xxp/vpm450m.c:36:10: fatal error: stdbool.h: No such file or directory
36 | #include <stdbool.h>
| ^~~~~~~~~~~
Wondering if I need to downgrade kernel version as it worked fine in 8.7

Look at: dnf provides */stdbool.h
There seems to be many candidates.

Look at dnf list \*dahdi\* too, if you have EPEL configured (the epel-release installed).
Are those existing RPM packages perhaps related to what you try to build from sources?

1 Like

Thank you, I will see which one best configs with dahdi and get back to you on just how I resolve the issue, this helps alot. Thanks again

make[2]: Leaving directory ‘/usr/src/asterisk/dahdi-linux-complete-3.2.0+3.2.0/linux/drivers/dahdi/firmware’
You do not appear to have the sources for the 6.3.1-1.el9.elrepo.x86_64 kernel installed.
make[1]: *** [Makefile:72: modules] Error 1
make[1]: Leaving directory ‘/usr/src/asterisk/dahdi-linux-complete-3.2.0+3.2.0/linux’
make: *** [Makefile:9: all] Error 2

…seems like I don’t have the “sources” I shall have to see what those are.

How did you solve this?

I am still getting the same error

/usr/local/src/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.

I tried to follow the steps provided but i don't know how to proceed from this point 

$ dnf list dahdi
Last metadata expiration check: 0:32:21 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

How am to proceed from here? @jlehtone

Jil, the issue is with Kernel it does not jive with dahdi. I have yet to find the correct solution for this.

Oh, thank you. Had thought of raising it with Asterisk.

First, a disclaimer: I have no idea what the ‘dahdi’ is.

You presumably want to have dahdi. You try to get it by building it from sources.
The build fails, because you don’t have something (stdbool.h) that the build requires.
That something is not part of dahdi. It must come from elsewhere.

The EPEL repo seems to have something that might be dahdi. If it is, and packages are
installed, then you do already have dahdi and do not need to build it from sources.

As general guideline, building from sources is not recommended on Enterprise Linux.
Prefer RPM-packages.

You have sources of dahdi in /usr/local/src. Only root user can write there.
Second guideline: When building something, do it as regular account, not as ‘root’.

Okay guys I found the answer which is to change the name stdbool.h to " linux/types.h " in each of the places that the error comes up on.

1 Like