From nobody Wed Jun 30 02:22:57 2021 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0F94211D3880 for ; Wed, 30 Jun 2021 02:22:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF4rK6zQ7z3hcm for ; Wed, 30 Jun 2021 02:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D855424822 for ; Wed, 30 Jun 2021 02:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 15U2Mv3d069607 for ; Wed, 30 Jun 2021 02:22:57 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 15U2MvRF069606 for ports-bugs@FreeBSD.org; Wed, 30 Jun 2021 02:22:57 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 256897] lang/go: unable to build on armv7 Date: Wed, 30 Jun 2021 02:22:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: brd@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: dmgk@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256897 Bug ID: 256897 Summary: lang/go: unable to build on armv7 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: dmgk@freebsd.org Reporter: brd@FreeBSD.org CC: jhb@FreeBSD.org, paulzhol@gmail.com Flags: maintainer-feedback?(dmgk@freebsd.org) Assignee: dmgk@freebsd.org I have been trying to figure out why go won't build in an armv7 jail on a a= rm64 builder (AWS Graviton2 instance w/ HW FP). This is the error: runtime: this CPU has no floating point hardware, so it cannot run this GOARM=3D7 binary. Recompile using GOARM=3D5. So I added some debugging: diff --git a/src/runtime/os_freebsd.go b/src/runtime/os_freebsd.go index 730973a202..2ff154ce32 100644 --- a/src/runtime/os_freebsd.go +++ b/src/runtime/os_freebsd.go @@ -405,6 +405,7 @@ func sysauxv(auxv []uintptr) { timekeepSharedPage =3D (*vdsoTimekeep)(unsafe.Pointer(val)) } + print("calling archauxv with tag =3D ", tag, ", val =3D ", = val, "\n") archauxv(tag, val) } } diff --git a/src/runtime/os_freebsd_arm.go b/src/runtime/os_freebsd_arm.go index 3feaa5e225..a894e7de5e 100644 --- a/src/runtime/os_freebsd_arm.go +++ b/src/runtime/os_freebsd_arm.go @@ -15,6 +15,7 @@ func checkgoarm() { if goarm > 5 && cpu.HWCap&_HWCAP_VFP =3D=3D 0 { print("runtime: this CPU has no floating point hardware, so= it cannot run\n") print("this GOARM=3D", goarm, " binary. Recompile using GOARM=3D5.\n") + print("cpu.HWCap=3D", cpu.HWCap, "; vfp=3D", _HWCAP_VFP, ".= \n") exit(1) } if goarm > 6 && cpu.HWCap&_HWCAP_VFPv3 =3D=3D 0 { and built a new bootstrap using github.com/dmgk/go-bootstrap repo. Which showed me that cpu.HWCap is 0: Building Go cmd/dist using /wrkdirs/usr/ports/lang/go/work/go-freebsd-arm7-bootstrap. () cmd/dist calling archauxv with tag =3D 3, val =3D 65588 calling archauxv with tag =3D 4, val =3D 32 calling archauxv with tag =3D 5, val =3D 5 calling archauxv with tag =3D 6, val =3D 4096 calling archauxv with tag =3D 8, val =3D 0 calling archauxv with tag =3D 9, val =3D 471532 calling archauxv with tag =3D 7, val =3D 0 calling archauxv with tag =3D 24, val =3D 83886082 calling archauxv with tag =3D 15, val =3D 4294959023 calling archauxv with tag =3D 18, val =3D 1300139 calling archauxv with tag =3D 16, val =3D 4294958959 calling archauxv with tag =3D 17, val =3D 64 calling archauxv with tag =3D 19, val =3D 4 calling archauxv with tag =3D 20, val =3D 4294958944 calling archauxv with tag =3D 21, val =3D 12 calling archauxv with tag =3D 22, val =3D 4294959152 calling archauxv with tag =3D 23, val =3D 3 calling archauxv with tag =3D 27, val =3D 1 calling archauxv with tag =3D 28, val =3D 5 calling archauxv with tag =3D 29, val =3D 4294956876 calling archauxv with tag =3D 30, val =3D 55 calling archauxv with tag =3D 31, val =3D 4294956900 calling archauxv with tag =3D 32, val =3D 4294959088 runtime: this CPU has no floating point hardware, so it cannot run this GOARM=3D7 binary. Recompile using GOARM=3D5. cpu.HWCap=3D0; vfp=3D64. So far I have tracked down these parts: We never set cpu.HWCap here: https://github.com/golang/go/blob/master/src/runtime/os_freebsd_arm.go#L34-= L40 Because on FreeBSD we have_AT_HWCAP =3D 25 https://github.com/golang/go/blob/master/src/runtime/os_freebsd.go#L402-L419 I am not sure where to go from here. --=20 You are receiving this mail because: You are the assignee for the bug.=