Bug 277277 - sysutils/coreutils: fix on i386
Summary: sysutils/coreutils: fix on i386
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Li-Wen Hsu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-24 09:37 UTC by Martin Birgmeier
Modified: 2024-02-27 05:52 UTC (History)
3 users (show)

See Also:
jharris: maintainer-feedback+


Attachments
sysutils/coreutils: Fix build for i386 (1008 bytes, patch)
2024-02-26 02:35 UTC, Alastair Hogge
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2024-02-24 09:37:57 UTC
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
Comment 1 Alastair Hogge 2024-02-26 02:35:29 UTC
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 2 jharris 2024-02-26 05:17:25 UTC
Comment on attachment 248749 [details]
sysutils/coreutils: Fix build for i386

I can’t test x86, but LGTM.  Approved, thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-02-27 05:52:37 UTC
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(+)