Scenario: - FreeBSD stable/14 - ports latest - using portmaster to upgrade ports - upgrading sysutils/coreutils to 9.4 Result: - fails with configure: error: in '/usr/tmp/net/hal/z/SRC/FreeBSD/ports/MBi/main/sysutils/coreutils/work/coreutils-9.4': configure: error: could not enable timestamps after mid-January 2038. This package recommends support for these later timestamps. However, to proceed with signed 32-bit time_t even though it will fail then, configure with '--disable-year2038'. See 'config.log' for more details Fix: - use the following patch: diff --git a/sysutils/coreutils/Makefile b/sysutils/coreutils/Makefile index a346bdc5e090..a5cc711f6911 100644 --- a/sysutils/coreutils/Makefile +++ b/sysutils/coreutils/Makefile @@ -23,6 +23,9 @@ GNU_CONFIGURE_MANPREFIX=${PREFIX}/share # bugs.freebsd.org/160060 CONFIGURE_ARGS= --program-prefix=g \ --program-transform-name=s/stat/nustat/ +.if ${ARCH} == i386 +CONFIGURE_ARGS+= --disable-year2038 +.endif CONFIGURE_ENV= FORCE_UNSAFE_CONFIGURE=1 CONFLICTS_INSTALL= gdu geneweb gexpr rubygem-god # bin/gdu bin/gexpr bin/god bin/gwc Note: Other architectures are probably also affected and should be include in the .if statement -- Martin
Created attachment 248749 [details] sysutils/coreutils: Fix build for i386 Thanks for the patch, Martin, I have produced a git formatted patch, and attached it here for any other interested people.
Comment on attachment 248749 [details] sysutils/coreutils: Fix build for i386 I can’t test x86, but LGTM. Approved, thanks!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=79fe36a9783404fe0af3ff0902f645a9b2eaabbb commit 79fe36a9783404fe0af3ff0902f645a9b2eaabbb Author: Martin Birgmeier <d8zNeCFG@aon.at> AuthorDate: 2024-02-27 05:49:12 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2024-02-27 05:49:12 +0000 sysutils/coreutils: Fix build on i386 PR: 277277 Approved by: maintainer sysutils/coreutils/Makefile | 3 +++ 1 file changed, 3 insertions(+)