Public bug reported:

During the test-rebuild-20260320 on Ubuntu Resolute, foot fails to build
from source on all architectures with the following error:

  ../osc.c:516:26: error: initialization discards 'const' qualifier from
  pointer target type [-Werror=discarded-qualifiers]
    516 |         char *operator = strchr(key_value, '=');

This is caused by glibc 2.43 implementing ISO C23 changes where
strchr(), strrchr(), memchr(), etc. now return const-qualified pointers
when passed const-qualified arguments.  Ubuntu's default
-Werror=discarded-qualifiers flag turns this warning into a hard error.

The same issue affects notify.c and tokenize.c in the same source tree.

Upstream fix
------------

Yaakov Selkowitz (Red Hat) authored a patch that casts the return value
to (char *) in the three affected files.  Linux From Scratch already
ships this as foot-1.25.0-const_strchr-1.patch.

Patch: 
https://www.linuxfromscratch.org/slfs/view/13.0/download/foot/foot-1.25.0-const_strchr-1.patch
Upstream commit: 15ebc433baabd799252609e28bf79afd892b33a4

The patch touches:
  - notify.c  (memchr)
  - osc.c     (strchr)
  - tokenize.c (strchr)

Suggested fix
-------------

Apply the above patch as debian/patches/const-strchr.patch, or sync
with Debian if they have already applied it.

Build log
---------

https://launchpad.net/ubuntu/+archive/test-
rebuild-20260320-resolute/+build/32410191/+files/buildlog_ubuntu-
resolute-amd64.foot_1.25.0-1_BUILDING.txt.gz

Related bugs
------------

Ubuntu master bug for glibc 2.43 / ISO C23 FTBFS:
  https://bugs.launchpad.net/bugs/2142901

** Affects: foot (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152544

Title:
  FTBFS: foot 1.25.0-1 on resolute due to glibc 2.43 ISO C23 const
  qualifiers

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/foot/+bug/2152544/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to