Solved New header <stdbit.h> missing

14.2-RELEASE

New header <stdbit.h> missing for -std=c23

I have clang18 and gcc-14-devel. I tried both. They don't complain that they miss the new c23 standard, but compilers can't find the new header.

On Linux, the header is available for gcc13 and clang16.

Any suggestions?
 
When you do
Code:
root@fbsd14:~ # cc -std=dummy test.c
error: invalid value 'dummy' in '-std=dummy'
note: use 'c89', 'c90', or 'iso9899:1990' for 'ISO C 1990' standard
note: use 'iso9899:199409' for 'ISO C 1990 with amendment 1' standard
note: use 'gnu89' or 'gnu90' for 'ISO C 1990 with GNU extensions' standard
note: use 'c99' or 'iso9899:1999' for 'ISO C 1999' standard
note: use 'gnu99' for 'ISO C 1999 with GNU extensions' standard
note: use 'c11' or 'iso9899:2011' for 'ISO C 2011' standard
note: use 'gnu11' for 'ISO C 2011 with GNU extensions' standard
note: use 'c17', 'iso9899:2017', 'c18', or 'iso9899:2018' for 'ISO C 2017' standard
note: use 'gnu17' or 'gnu18' for 'ISO C 2017 with GNU extensions' standard
note: use 'c23' for 'Working Draft for ISO C23' standard
note: use 'gnu23' for 'Working Draft for ISO C23 with GNU extensions' standard
root@fbsd14:~ #
You can see the supported versions. Try with lower case C, i.e. c23
 
The point is not that, of course I tried -sdt=c23 and -std=c2x and -sdt=gnu23 but this is the error:

src/xxx.c:19:10: fatal error: stdbit.h: No such file or directory
19 | #include <stdbit.h>
| ^~~~~~~~~~
 
Ok, I focused on the incorrectly specified std in the prompt you shared. The stdbit.h is part of glibc, not (g)cc.
What are you're trying to compile?
 
This is FreeBSD, there's no glibc. Maybe somebody who ports software here can share some tips though.

I see you censored the source file that threw that error. I saw it before and googled it; found it matched q2pro - quake2 stuff.

In my VM I freshly deployed I was able to compile it though.. So either I found something else or you have some other options hitting this issue:
Code:
[fbsd14 /local/q2pro]$ meson compile -C builddir
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/local/bin/ninja -C /local/q2pro/builddir
ninja: Entering directory `/local/q2pro/builddir'
[91/91] Linking target gamex86_64.so
[fbsd14 /local/q2pro]$
*update: that had to be some weird google match on my side. But keeping it here for consistency.

But this (gnu.org) may shed more light.
 
<stdbit.h> is glibc specific, and doesn't exist in Alpine Linux (musl based distribution), and definitely not a part of BSD family
 
Back
Top