Dear maintainer(s),
yambar fails to build from source with glibc 2.43, currently in
experimental. From the build log:
| [86/98] cc -Iyambar.p -I. -I.. -Iparticles -I../particles -Ibar -Imodules -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/json-c -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c18 -DMEMFD_CREATE -fmacro-prefix-map=../= -D_GNU_SOURCE -DENABLE_X11 -DENABLE_WAYLAND -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/yambar-1.11.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wno-error=format-truncation -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_PLUGIN_foreign_toplevel -DHAVE_PLUGIN_river -DHAVE_PLUGIN_xwindow -DHAVE_PLUGIN_xkb -DHAVE_PLUGIN_sway_xkb -DHAVE_PLUGIN_script -DHAVE_PLUGIN_removables -DHAVE_PLUGIN_pulse -D_REENTRANT -DHAVE_PLUGIN_pipewire -DHAVE_PLUGIN_network -DHAVE_PLUGIN_label -DHAVE_PLUGIN_i3 -DHAVE_PLUGIN_mpd -DHAVE_PLUGIN_mem -DHAVE_PLUGIN_dwl -DHAVE_PLUGIN_disk_io -DHAVE_PLUGIN_cpu -DHAVE_PLUGIN_clock -DHAVE_PLUGIN_battery -DHAVE_PLUGIN_backlight -DHAVE_PLUGIN_alsa -DHAVE_PLUGIN_string -DHAVE_PLUGIN_ramp -DHAVE_PLUGIN_progress_bar -DHAVE_PLUGIN_map -DHAVE_PLUGIN_list -DHAVE_PLUGIN_empty -DHAVE_PLUGIN_overline -DHAVE_PLUGIN_underline -DHAVE_PLUGIN_stack -DHAVE_PLUGIN_border -DHAVE_PLUGIN_background -pthread -DUTF8PROC_EXPORTS -MD -MQ yambar.p/tag.c.o -MF yambar.p/tag.c.o.d -o yambar.p/tag.c.o -c ../tag.c
| FAILED: [code=1] yambar.p/tag.c.o
| cc -Iyambar.p -I. -I.. -Iparticles -I../particles -Ibar -Imodules -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/json-c -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c18 -DMEMFD_CREATE -fmacro-prefix-map=../= -D_GNU_SOURCE -DENABLE_X11 -DENABLE_WAYLAND -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/yambar-1.11.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wno-error=format-truncation -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_PLUGIN_foreign_toplevel -DHAVE_PLUGIN_river -DHAVE_PLUGIN_xwindow -DHAVE_PLUGIN_xkb -DHAVE_PLUGIN_sway_xkb -DHAVE_PLUGIN_script -DHAVE_PLUGIN_removables -DHAVE_PLUGIN_pulse -D_REENTRANT -DHAVE_PLUGIN_pipewire -DHAVE_PLUGIN_network -DHAVE_PLUGIN_label -DHAVE_PLUGIN_i3 -DHAVE_PLUGIN_mpd -DHAVE_PLUGIN_mem -DHAVE_PLUGIN_dwl -DHAVE_PLUGIN_disk_io -DHAVE_PLUGIN_cpu -DHAVE_PLUGIN_clock -DHAVE_PLUGIN_battery -DHAVE_PLUGIN_backlight -DHAVE_PLUGIN_alsa -DHAVE_PLUGIN_string -DHAVE_PLUGIN_ramp -DHAVE_PLUGIN_progress_bar -DHAVE_PLUGIN_map -DHAVE_PLUGIN_list -DHAVE_PLUGIN_empty -DHAVE_PLUGIN_overline -DHAVE_PLUGIN_underline -DHAVE_PLUGIN_stack -DHAVE_PLUGIN_border -DHAVE_PLUGIN_background -pthread -DUTF8PROC_EXPORTS -MD -MQ yambar.p/tag.c.o -MF yambar.p/tag.c.o.d -o yambar.p/tag.c.o -c ../tag.c
| ../tag.c: In function ‘tags_expand_template’:
| ../tag.c:564:29: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
| 564 | else if ((point = strchr(tag_args[i], '.')) != NULL) {
| | ^
| cc1: all warnings being treated as errors
...
| [88/98] cc -Iyambar.p -I. -I.. -Iparticles -I../particles -Ibar -Imodules -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/json-c -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c18 -DMEMFD_CREATE -fmacro-prefix-map=../= -D_GNU_SOURCE -DENABLE_X11 -DENABLE_WAYLAND -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/yambar-1.11.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wno-error=format-truncation -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_PLUGIN_foreign_toplevel -DHAVE_PLUGIN_river -DHAVE_PLUGIN_xwindow -DHAVE_PLUGIN_xkb -DHAVE_PLUGIN_sway_xkb -DHAVE_PLUGIN_script -DHAVE_PLUGIN_removables -DHAVE_PLUGIN_pulse -D_REENTRANT -DHAVE_PLUGIN_pipewire -DHAVE_PLUGIN_network -DHAVE_PLUGIN_label -DHAVE_PLUGIN_i3 -DHAVE_PLUGIN_mpd -DHAVE_PLUGIN_mem -DHAVE_PLUGIN_dwl -DHAVE_PLUGIN_disk_io -DHAVE_PLUGIN_cpu -DHAVE_PLUGIN_clock -DHAVE_PLUGIN_battery -DHAVE_PLUGIN_backlight -DHAVE_PLUGIN_alsa -DHAVE_PLUGIN_string -DHAVE_PLUGIN_ramp -DHAVE_PLUGIN_progress_bar -DHAVE_PLUGIN_map -DHAVE_PLUGIN_list -DHAVE_PLUGIN_empty -DHAVE_PLUGIN_overline -DHAVE_PLUGIN_underline -DHAVE_PLUGIN_stack -DHAVE_PLUGIN_border -DHAVE_PLUGIN_background -pthread -DUTF8PROC_EXPORTS -MD -MQ yambar.p/modules_script.c.o -MF yambar.p/modules_script.c.o.d -o yambar.p/modules_script.c.o -c ../modules/script.c
| FAILED: [code=1] yambar.p/modules_script.c.o
| cc -Iyambar.p -I. -I.. -Iparticles -I../particles -Ibar -Imodules -I/usr/include/pixman-1 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/aarch64-linux-gnu/glib-2.0/include -I/usr/include/sysprof-6 -I/usr/include/json-c -I/usr/include/pipewire-0.3 -I/usr/include/spa-0.2 -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Werror -std=c18 -DMEMFD_CREATE -fmacro-prefix-map=../= -D_GNU_SOURCE -DENABLE_X11 -DENABLE_WAYLAND -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/yambar-1.11.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -Wno-error=format-truncation -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_PLUGIN_foreign_toplevel -DHAVE_PLUGIN_river -DHAVE_PLUGIN_xwindow -DHAVE_PLUGIN_xkb -DHAVE_PLUGIN_sway_xkb -DHAVE_PLUGIN_script -DHAVE_PLUGIN_removables -DHAVE_PLUGIN_pulse -D_REENTRANT -DHAVE_PLUGIN_pipewire -DHAVE_PLUGIN_network -DHAVE_PLUGIN_label -DHAVE_PLUGIN_i3 -DHAVE_PLUGIN_mpd -DHAVE_PLUGIN_mem -DHAVE_PLUGIN_dwl -DHAVE_PLUGIN_disk_io -DHAVE_PLUGIN_cpu -DHAVE_PLUGIN_clock -DHAVE_PLUGIN_battery -DHAVE_PLUGIN_backlight -DHAVE_PLUGIN_alsa -DHAVE_PLUGIN_string -DHAVE_PLUGIN_ramp -DHAVE_PLUGIN_progress_bar -DHAVE_PLUGIN_map -DHAVE_PLUGIN_list -DHAVE_PLUGIN_empty -DHAVE_PLUGIN_overline -DHAVE_PLUGIN_underline -DHAVE_PLUGIN_stack -DHAVE_PLUGIN_border -DHAVE_PLUGIN_background -pthread -DUTF8PROC_EXPORTS -MD -MQ yambar.p/modules_script.c.o -MF yambar.p/modules_script.c.o.d -o yambar.p/modules_script.c.o -c ../modules/script.c
| ../modules/script.c: In function ‘process_transaction’:
| ../modules/script.c:268:26: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
| 268 | char *line_end = memchr(line, '\n', left);
| | ^~~~~~
| 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/yambar_arm64.build
[2] https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=e271fb2e4d76903c77a302aaec1ca22ce31027d0;hb=f762ccf84f122d1354f103a151cba8bde797d521#l19