Thread View: linux.debian.bugs.rc
2 messages
2 total messages
Started by Sebastien Bacher
Wed, 14 Oct 2026 21:40
Bug#1128761: yambar: FTBFS with glibc 2.43 due to ISO C23 const return types
Author: Sebastien Bacher
Date: Wed, 14 Oct 2026 21:40
Date: Wed, 14 Oct 2026 21:40
104 lines
5550 bytes
5550 bytes
This is a multi-part MIME message sent by reportbug.
--===============3772739553840754796==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Source: yambar
Followup-For: Bug #1128761
X-Debbugs-Cc: seb128@ubuntu.com
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu stonking ubuntu-patch
Control: tags -1 patch ftbfs
Hi,
The attached patch fixes the build with glibc 2.43. There are two spots;
the second one (modules/script.c) isn't in the original log because ninja
stops at the first failure:
- tag.c: tag_args[] point into the local, writable tag_name_and_arg
copy, and the code writes a '\0' through the strchr() result, so the
const on tag_args/arg is just unneeded. Dropped it.
- modules/script.c: line_end = memchr(line, ...) with a const line;
line_end is only read, so it is now const char *.
Upstream (codeberg.org/dnkl/yambar) is no longer developed. FWIW the
maintained continuation is maybar (https://codeberg.org/mathstuf/maybar).
It has the same two spots: they were reported as maybar #40/#41 and closed
as "C23 only". But glibc 2.43 triggers them even with the -std=c18 the
package already builds with, as your build log shows.
We are carrying it in Ubuntu as yambar 1.11.0-2ubuntu1.
Cheers,
Sebastien
-- System Information:
Debian Release: forky/sid
APT prefers resolute-updates
APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute'), (100, 'resolute-backports')
Architecture: amd64 (x86_64)
Kernel: Linux 7.0.0-38-generic (SMP w/16 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
--===============3772739553840754796==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="glibc-2.43-const.patch"
Description: Fix build with glibc 2.43 (ISO C23 const-preserving strchr/memchr)
glibc 2.43 makes strchr() and memchr() return a const-qualified pointer
when passed a const-qualified one, which -Werror turns into build failures:
- tag.c: tag_args[] point into the local, writable tag_name_and_arg copy
and the code writes a '\0' through the strchr() result, so drop the
unneeded const from tag_args/arg.
- modules/script.c: line_end is only read, make it const.
Author: Sebastien Bacher <seb128@ubuntu.com>
Bug-Debian: https://bugs.debian.org/1128761
Forwarded: not-needed
Last-Update: 2026-10-14
--- a/tag.c
+++ b/tag.c
@@ -476,7 +476,7 @@
static const size_t MAX_TAG_ARGS = 4;
const char *tag_name = NULL;
- const char *tag_args[MAX_TAG_ARGS];
+ char *tag_args[MAX_TAG_ARGS];
memset(tag_args, 0, sizeof(tag_args));
{
@@ -484,7 +484,7 @@
tag_name = strtok_r(tag_name_and_arg, ":", &saveptr);
for (size_t i = 0; i < MAX_TAG_ARGS; i++) {
- const char *arg = strtok_r(NULL, ":", &saveptr);
+ char *arg = strtok_r(NULL, ":", &saveptr);
if (arg == NULL)
break;
tag_args[i] = arg;
--- a/modules/script.c
+++ b/modules/script.c
@@ -265,7 +265,7 @@
size_t idx = 0;
while (left > 0) {
- char *line_end = memchr(line, '\n', left);
+ const char *line_end = memchr(line, '\n', left);
assert(line_end != NULL);
size_t line_len = line_end - line;
--===============3772739553840754796==--
Processed: Re: yambar: FTBFS with glibc 2.43 due to ISO C23 const return types
Author: Debian Bug Tracking System
Date: Wed, 14 Oct 2026 21:40
Date: Wed, 14 Oct 2026 21:40
11 lines
2006 bytes
2006 bytes
Processing control commands: > tags -1 patch ftbfs Bug #1128761 [src:yambar] yambar: FTBFS with glibc 2.43 due to ISO C23 const return types Added tag(s) patch. -- 1128761: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128761 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads