#1128544 fyi: FTBFS with glibc 2.43 due to ISO C23 const return types

Package:
src:fyi
Source:
src:fyi
Submitter:
Aurelien Jarno
Date:
2026-02-20 22:47:03 UTC
Severity:
normal
Tags:
#1128544#5
Date:
2026-02-20 22:44:47 UTC
From:
To:
Dear maintainer(s),

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

|    dh_auto_build
| 	cd obj-aarch64-linux-gnu && LC_ALL=C.UTF-8 ninja -j128 -v
| [1/4] /usr/bin/env LC_ALL=C ../generate-version.sh 1.0.4 ../ version.h
| [2/4] /usr/bin/meson --internal exe --capture doc/fyi.1 --feed ../doc/fyi.1.scd -- /usr/bin/scdoc
| [3/4] cc -Ifyi.p -I. -I.. -I/usr/include/dbus-1.0 -I/usr/lib/aarch64-linux-gnu/dbus-1.0/include -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c11 -fno-asynchronous-unwind-tables -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/fyi-1.0.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ fyi.p/main.c.o -MF fyi.p/main.c.o.d -o fyi.p/main.c.o -c ../main.c
| FAILED: [code=1] fyi.p/main.c.o
| cc -Ifyi.p -I. -I.. -I/usr/include/dbus-1.0 -I/usr/lib/aarch64-linux-gnu/dbus-1.0/include -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c11 -fno-asynchronous-unwind-tables -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/fyi-1.0.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wdate-time -D_FORTIFY_SOURCE=2 -MD -MQ fyi.p/main.c.o -MF fyi.p/main.c.o.d -o fyi.p/main.c.o -c ../main.c
| ../main.c: In function ‘main’:
| ../main.c:558:27: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
|   558 |             char *split = strchr(type_str, ':');
|       |                           ^~~~~~
| ../main.c:563:23: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
|   563 |                 split = strchr(name, ':');
|       |                       ^
| cc1: all warnings being treated as errors
| ninja: build stopped: subcommand failed.
| dh_auto_build: error: cd obj-aarch64-linux-gnu && LC_ALL=C.UTF-8 ninja -j128 -v returned exit code 1
| make: *** [debian/rules:7: binary] Error 25
| dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

The full build log is available here [1].

The issue is due to ISO C23 declaration of bsearch, memchr, strchr,
strpbrk, strrchr, strstr, wcschr, wcspbrk, wcsrchr, wcsstr and wmemchr,
which now returns a pointer to a const-qualified type when the input
argument is a pointer to a const-qualified type [2].

I would like to thanks Emanuele Rocca for doing the archive rebuild on
a fast arm64 server.

Regards
Aurelien

[1] https://people.debian.org/~ema/glibc-2.43-rebuilds/output-1/fyi_arm64.build
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19