Hello.

I received the report below from the Debian bug system.

I see a recent commit from Paul Eggert regarding glibc 2.43,
so I guess this is already known. Should I try to cherry-pick
fixes from the git repo (and if so, which ones?) or maybe I can
expect a new release of m4 soon?

Thanks.

----- Forwarded message from Aurelien Jarno <[email protected]> -----

Date: Sun, 01 Feb 2026 23:34:57 +0100
From: Aurelien Jarno <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: Bug#1126817: m4: FTBFS with glibc 2.43 due to ISO C23 const return 
types

Source: m4
Version: 1.4.20-2
Severity: important
Tags: ftbfs upstream
Justification: fails to build from source
User: [email protected]
Usertags: glibc-2.43

Dear maintainer,

m4 fails to build from source with glibc 2.43, currently in
experimental. From the build log:

| gcc  -I.   -Wdate-time -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 -g -O2 
-Werror=implicit-function-declaration 
-ffile-prefix-map=/build/reproducible-path/m4-1.4.20=. -fstack-protector-strong 
-fstack-clash-protection -fcf-protection -c -o libm4_a-asyncsafe-spin.o `test 
-f 'asyncsafe-spin.c' || echo './'`asyncsafe-spin.c
| In file included from /usr/include/features.h:539,
|                  from /usr/include/x86_64-linux-gnu/sys/types.h:25,
|                  from ./sys/types.h:46,
|                  from ./signal.h:49,
|                  from asyncsafe-spin.h:43,
|                  from asyncsafe-spin.c:22:
| ./stdlib.h:827:20: error: expected identifier or '(' before '_Generic'
|   827 | _GL_EXTERN_C void *bsearch (const void *__key,
|       |                    ^~~~~~~
| make[4]: *** [Makefile:4118: libm4_a-asyncsafe-spin.o] Error 1
| make[4]: Leaving directory '/build/reproducible-path/m4-1.4.20/lib'
| make[3]: *** [Makefile:3608: all] Error 2
| make[3]: Leaving directory '/build/reproducible-path/m4-1.4.20/lib'
| make[2]: *** [Makefile:2530: all-recursive] Error 1
| make[2]: Leaving directory '/build/reproducible-path/m4-1.4.20'
| make[1]: *** [Makefile:2486: all] Error 2
| make[1]: Leaving directory '/build/reproducible-path/m4-1.4.20'
| dh_auto_build: error: make -j1 returned exit code 2
| make: *** [debian/rules:8: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit 
status 2

The full build log is attached to this bug report.

The issue is due to ISO C23 declaration of bsearch, which now returns a
pointer to a const-qualified type when the input argument is a pointer
to a const-qualified type [1].

Regards
Aurelien

[1] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19



----- End forwarded message -----

Reply via email to