Clang 18 has become more stringent about use of checked integer operations, resulting in errors when building sysutils/coreutils: lib/posixtm.c:194:15: error: operand argument to checked integer operation must be an integer type other than plain 'char', 'bool', bit-precise, or an enumeration ('bool' invalid) 194 | if (ckd_add (&t, t, leapsec)) | ^~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/stdckdint.h:16:37: note: expanded from macro 'ckd_add' 16 | (_Bool)__builtin_add_overflow((a), (b), (result)) | ^~~ The actual issue is the gnulib part of coreutils, which is a separate GNU project. That project has already identified and fixed it: https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=67c298c36f6 Apply the fix to fix the build with clang 18.
Created attachment 248717 [details] sysutils/coreutils: fix build with clang 18
Comment on attachment 248717 [details] sysutils/coreutils: fix build with clang 18 Approved, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=45b681ee03a1caebb65a89e4772a7afdcbacbf42 commit 45b681ee03a1caebb65a89e4772a7afdcbacbf42 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-02-27 05:01:23 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2024-02-27 05:01:23 +0000 sysutils/coreutils: Fix build with clang 18 PR: 277280 Approved by: maintainer sysutils/coreutils/Makefile | 1 + sysutils/coreutils/files/patch-lib_posixtm.c (new) | 24 ++++++++++++++++++++++ 2 files changed, 25 insertions(+)