Opened 4 years ago

Closed 4 years ago

#60942 closed enhancement (fixed)

go: Support arm64

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: herbygillot (Herby Gillot), jrjsmrtn
Port: go

Description

The go port currently restricts itself to i386 and x86_64. Can you investigate supporting arm64 as well?

https://github.com/golang/go/wiki/GoArm

Change History (6)

comment:1 Changed 4 years ago by meme (Keegan Saunders)

As https://github.com/golang/go/issues/42684 has been closed, Go now works for arm64. However, it is slated for the next release and can be built from tip of tree or backported into a release version.

However, Go 1.4 can no longer be used for bootstrapping because it does not support Darwin arm64. This means that a bootstrap toolchain is required to be provided in binary form.

Last edited 4 years ago by meme (Keegan Saunders) (previous) (diff)

comment:2 Changed 4 years ago by raw-bin (Robin Randhawa)

On a fresh installation on Big Sur 11.2.2 on my Apple M1 based MacBook Pro 13, using macports from git, I find that attempting to install go results in x86_64 assets getting used.

Relevant details:

> uname -a
Darwin 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64

> xcodebuild -version
Xcode 12.4
Build version 12D4e

> sudo port install go
Password:
--->  Fetching archive for go
--->  Attempting to fetch go-1.16_0.darwin_20.x86_64.tbz2 from https://lil.fr.packages.macports.org/go

> git log --pretty=oneline | head -n 5
0c2f339374a5cacd904c32b88b8f773c4b93d4cd jsonnet-bundler: new port
1a5f4862932cb4be9bc910574697553c7a71927c tanka: new port
7f54ecdc0537426d0dee10a9c50705b90463db80 AppCSXCAD: new port
35422026ce47d21e21e03746a6122c24118455d2 QCSXCAD: new port
a7cb777cb8db125f6fe60581ce62b64dfa044b4c py-rich: update to 9.13.0

Is this expected ?

comment:3 Changed 4 years ago by jrjsmrtn

Cc: jrjsmrtn added

comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Yes, since Josh just fixed it to do that in [84dd03127da4647acd1fea8d612dedde07c7e3f3/macports-ports]. This ticket remains open to track getting a native arm64 version of go.

comment:5 Changed 4 years ago by herbygillot (Herby Gillot)

In 1f387629e89699a2bc594cfdd0d101cbdacff056/macports-ports (master):

go: build for ARM64

Use a temporary binary distribution of ARM64 Go to build on ARM64.
For all other architectures (x86_64, etc), continue to bootstrap using Go 1.4.

See: #60942

comment:6 Changed 4 years ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: assignedclosed

Go has built successfully on the macOS 11 ARM64 buildbot:

https://build.macports.org/builders/ports-11_arm64-builder/builds/13138/steps/install-port/logs/stdio

Closing as fixed.

Note: See TracTickets for help on using tickets.