Public bug reported: goxel 0.15.1-1 fails to build in stonking because glibc 2.43+ made strrchr() const-preserving and goxel builds with -Werror.
Build log (amd64, 2026-09-24, libc6-dev 2.44-1ubuntu1, gcc-15 15.3.0-4ubuntu1): https://launchpad.net/ubuntu/+source/goxel/0.15.1-1/+build/33019031 src/utils.c: In function 'str_replace_ext': src/utils.c:121:9: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] 121 | pos = strrchr(str, '.'); src/../ext_src/quickjs/quickjs.c:27267:7: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] p = strrchr(base_name, '/'); cc1: all warnings being treated as errors == Cause == - glibc 2.43 turned strchr, strrchr, memchr, strstr and similar functions into macros that return a const-qualified pointer when given a const-qualified argument (glibc NEWS, 2.43). This is a C23 feature, but glibc also enables it under _GNU_SOURCE, and goxel's src/config.h defines _GNU_SOURCE. So it applies even though goxel builds with -std=gnu99. - In both places above, strrchr() is called on a const char * and the result is stored in a plain char *. - goxel's SConstruct defaults to werror=True, so the new -Wdiscarded-qualifiers warning becomes a hard error. Debian is not visibly affected yet: its amd64 0.15.1-1+b1 was built around 2026-07-31, before glibc 2.43 reached unstable (2026-08-10). The next Debian rebuild should fail the same way. Upstream goxel master still has the same code in str_replace_ext(). == Suggested fix (untested) == 1. Proper fix, for upstream (goxel, and the bundled quickjs): - src/utils.c, str_replace_ext(): declare "const char *pos;" - ext_src/quickjs/quickjs.c around line 27267: make "p" const, if it is not written through later in that function; otherwise keep it char * and cast. 2. Packaging fix: pass werror=0 to scons in debian/rules (the "scons cycles=0 debug=0 clang=1 ..." line), so new compiler or glibc warnings do not break distribution builds. Preferably both go to Debian and are synced. Only the amd64 build log was checked; other architectures are expected to fail the same way. ** Affects: goxel (Ubuntu) Importance: Undecided Status: New ** Tags: update-excuse ** Tags added: update-excuse -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2169229 Title: goxel 0.15.1-1 FTBFS: strrchr() const-preserving with glibc >= 2.43 + -Werror (discarded-qualifiers) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/goxel/+bug/2169229/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
