Repository navigation
0.4.4 fails to build with glibc 2.43 #159
Copy link
Copy link
Closed
Description
[...]
x86_64-pc-linux-gnu-cc -DHAVE_CONFIG_H -I. -I.. -march=native -O2 -pipe -D_GNU_SOURCE -D_FORTIFY_SOURCE=2 -Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare -Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion -Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits -Wno-unused-const-variable -Wno-unsuffixed-float-constants -Wno-error -march=native -O2 -pipe -Wall -c -o libgnu_a-stdlib.o `test -f 'stdlib.c' || echo './'`stdlib.c
In file included from /usr/x86_64-pc-linux-gnu/include/features.h:540,
from /usr/x86_64-pc-linux-gnu/include/bits/libc-header-start.h:33,
from /usr/x86_64-pc-linux-gnu/include/stdlib.h:26,
from ./stdlib.h:51,
from fd-hook.c:23:
./stdlib.h:807:20: error: expected identifier or '(' before '_Generic'
807 | _GL_EXTERN_C void *bsearch (const void *__key,
| ^~~~~~~
In file included from /usr/x86_64-pc-linux-gnu/include/features.h:540,
from /usr/x86_64-pc-linux-gnu/include/bits/libc-header-start.h:33,
from /usr/x86_64-pc-linux-gnu/include/stdlib.h:26,
from ./stdlib.h:51,
from stdlib.c:21:
./stdlib.h:807:20: error: expected identifier or '(' before '_Generic'
807 | _GL_EXTERN_C void *bsearch (const void *__key,
| ^~~~~~~
make[3]: *** [Makefile:1588: libgnu_a-fd-hook.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:1826: libgnu_a-stdlib.o] Error 1
In file included from /usr/x86_64-pc-linux-gnu/include/features.h:540,
from /usr/x86_64-pc-linux-gnu/include/bits/libc-header-start.h:33,
from /usr/x86_64-pc-linux-gnu/include/stdlib.h:26,
from ./stdlib.h:51,
from getprogname.c:20:
./stdlib.h:807:20: error: expected identifier or '(' before '_Generic'
807 | _GL_EXTERN_C void *bsearch (const void *__key,
| ^~~~~~~
In file included from /usr/x86_64-pc-linux-gnu/include/features.h:540,
from /usr/x86_64-pc-linux-gnu/include/sys/types.h:25,
from ./sys/types.h:46,
from ./fcntl.h:63,
from fcntl.c:23:
./stdlib.h:807:20: error: expected identifier or '(' before '_Generic'
807 | _GL_EXTERN_C void *bsearch (const void *__key,
| ^~~~~~~
In file included from /usr/x86_64-pc-linux-gnu/include/features.h:540,
from /usr/x86_64-pc-linux-gnu/include/bits/libc-header-start.h:33,
from /usr/x86_64-pc-linux-gnu/include/stdlib.h:26,
from ./stdlib.h:51,
from malloca.h:29,
from malloca.c:22:
./stdlib.h:807:20: error: expected identifier or '(' before '_Generic'
807 | _GL_EXTERN_C void *bsearch (const void *__key,
| ^~~~~~~
make[3]: *** [Makefile:1672: libgnu_a-getprogname.o] Error 1
make[3]: *** [Makefile:1700: libgnu_a-malloca.o] Error 1
Full build log: patchutils-0.4.4_build.log
glibc 2.43 release notes: https://sourceware.org/glibc/wiki/Release/2.43#C23_Const-Preserving_Standard_Library_Macros_May_Break_Some_Packages
A new release with updated gnulib to fix this would be nice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
tgurr commentedon Feb 10, 2026
For anyone in need of a fix to apply downstream for the time being, Fedora ships with this patch: https://src.fedoraproject.org/rpms/patchutils/blob/rawhide/f/patchutils-0.4.4-ftbfs-gnulib.patch
twaugh commentedon Feb 26, 2026
Fixed in 0.4.5.
hhoffstaette commentedon Feb 26, 2026
Well actually.. :-)
diff.candutil.ccan be fixed by simply marking p asconst char *.rediff.cis a bit more tricky sincemetais being passed in asconst char *already and casting it tochar *should be considered a Bad Idea. Maybe makemetamutable or operate on a copy.More const fixes for C23
More const fixes for C23 [0.4.x]