[Bug 297421] lang/gawk: Fix regression in 5.4.1 when MPFR and GMP are not selected

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 10 Aug 2026 16:43:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297421

            Bug ID: 297421
           Summary: lang/gawk: Fix regression in 5.4.1 when MPFR and GMP
                    are not selected
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: danfe@FreeBSD.org
          Reporter: leres@freebsd.org
          Assignee: danfe@FreeBSD.org
             Flags: maintainer-feedback?(danfe@FreeBSD.org)

5.4.1 introduced a regression when built without MPFR and GMP:

    sea 75 % cat repro.awk
    {
        if (arr[$1] == "")
            seen[$1] = 1
        arr[$1] = arr[$1] $2 ";"
        print "[" arr[$1] "]"
    }
    sea 76 % cat repro.in
    k v1
    sea 77 % ./gawk-5.4.0 -f repro.awk < repro.in
    [v1;]
    sea 78 % ./gawk-5.4.1 -f repro.awk < repro.in
    [0v1;]

(this commonly breaks gcc builds)

The problem is discussed here:

    https://lists.gnu.org/archive/html/bug-gawk/2026-07/msg00011.html
    https://lists.gnu.org/archive/html/bug-gawk/2026-07/msg00013.html

This is the upstream commit that fixes it:

   
https://github.com/sailfishos-mirror/gawk/commit/bf85f8a3175af703597082d4c7e0abc2066a44d3

patch attached.

-- 
You are receiving this mail because:
You are the assignee for the bug.