Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/build: add builder for macOS on Apple silicon #39782

Closed
cagedmantis opened this issue Jun 23, 2020 · 18 comments
Closed

x/build: add builder for macOS on Apple silicon #39782

cagedmantis opened this issue Jun 23, 2020 · 18 comments
Labels
arch-arm64 Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. new-builder OS-Darwin release-blocker
Milestone

Comments

@cagedmantis
Copy link
Contributor

Apple has announced plans to transition their Mac platform to run on Apple silicon chips. A set of builders would be needed for the resulting port.

/cc @andybons @dmitshur @toothrot

@cagedmantis cagedmantis added OS-Darwin Builders x/build issues (builders, bots, dashboards) NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. new-builder labels Jun 23, 2020
@cagedmantis cagedmantis added this to the Unreleased milestone Jun 23, 2020
@cagedmantis
Copy link
Contributor Author

#38485 Tracks related changes to the runtime.

@dmitshur
Copy link
Contributor

This issue corresponds to the following bullet points in https://golang.org/wiki/PortingPolicy#requirements-for-a-new-port:

  • A developer must be named (and agree) to maintain the builder, the machine trying each git revision and providing data for https://build.golang.org.

  • The builder must already be running (and failing, because the code is not yet in the main repository).

@eacp
Copy link

eacp commented Jun 25, 2020

What about Universal Binaries?

@toothrot
Copy link
Contributor

Hey @eacp, broader support for the new architecture will be discussed on a separate issue. This issue is just about our build infrastructure. Thanks!

@tzeejay
Copy link

tzeejay commented Jun 29, 2020

@toothrot Hey I have just received my DTK earlier today. Is there anything I can do to help the project with adoption of the architecture or help build prebuilt packages? I just installed the darwin-amd64 macOS package from golang.org and it took a bit to install but succeeded and go version is giving me this:

cj@cjs-Mac ~ % go version
go version go1.14.4 darwin/amd64

(I used to work for CircleCI and helped maintain the macOS infrastructure so I have a little bit of experience with this but I am entirely clueless as to what is required for Go)

@dmitshur
Copy link
Contributor

@tzeejay Thanks for the offer to help! We're currently in the release freeze period for Go 1.15, so active work on this will likely wait until the tree re-opens in a bit over a month from now. Also follow issue #38485 for any port-specific updates. We'll reach out to you if we find a way you can contribute.

Based on what you said, it seems like the darwin/amd64 port is working via Rosetta 2, which is great to see.

@tzeejay
Copy link

tzeejay commented Jun 29, 2020

To be honest I have not yet had the time to compile the projects that I am working on for work (neither Objective-C nor Go).

Overall the system feels exactly like presented in the keynote. I can't wait to have code running on this that was actually compiled for it.
I am too young to have gone through an architecture transition like this so I am not sure where to begin. Once there is headroom to tackle this problem I would be very much interested in helping though 👍

@tzeejay
Copy link

tzeejay commented Jul 4, 2020

Little update for anybody interested.

  1. It does compile x86_64 code which can be executed through Rosetta 2 on the Mac itself. I develop our central server backend that way on my 16" MacBook Pro, and then deploy to Linux. Everything feels equivalent to a build on an Intel Mac.

  2. It successfully cross compiles to Linux x86_64.
    Granted I haven't added any crazy dependencies to it. It mostly depends on lib/pg and julienschmidt/httprouter.
    It is interesting to see though that this is possible at all with a regular release of Go from the website compiled for a foreign architecture.

@eaglemoor
Copy link

eaglemoor commented Nov 10, 2020

Will be cool see native support M1 and what happen with Docker xD
M1 is out!

@bcmills
Copy link
Contributor

bcmills commented Nov 19, 2020

Come to think of it, we should probably have two builder configurations, at least in the short term: one running native GOARCH=arm64 binaries, and one running GOARCH=amd64 binaries under Rosetta 2 (to catch issues like #42700).

@tzeejay
Copy link

tzeejay commented Nov 19, 2020

@bcmills No idea where your CI currently runs. I used to work at macstadium.com . They ordered 600 M1 based Mac minis. Let me know if I should establish a connection for these machines

@aclements

This comment has been minimized.

@bcmills

This comment has been minimized.

@dmitshur
Copy link
Contributor

dmitshur commented Nov 19, 2020

@tzeejay Thanks. We do use MacStadium, as you can see at https://github.com/golang/build/tree/master/env/darwin/macstadium. @cagedmantis reached out to them on November 10, and we are now waiting for the new machines to become available.

@gopherbot
Copy link

Change https://golang.org/cl/278432 mentions this issue: dashboard: add new darwin-arm64-11_0-toothrot builder

gopherbot pushed a commit to golang/build that referenced this issue Dec 15, 2020
These builders are run by the Go team. They are non-hermetic.

For golang/go#39782

Change-Id: Ie402faf9a92ff6c667c8da6fc0dac8528331df48
Reviewed-on: https://go-review.googlesource.com/c/build/+/278432
Trust: Alexander Rakoczy <alex@golang.org>
Run-TryBot: Alexander Rakoczy <alex@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/278772 mentions this issue: dashboard: remove known issue for darwin arm builder

@gopherbot
Copy link

Change https://golang.org/cl/306649 mentions this issue: cmd/coordinator: add health check for M1 Mac minis

gopherbot pushed a commit to golang/build that referenced this issue Apr 1, 2021
Make the health dashboard more useful by displaying
the status of the darwin/arm64 reverse builders.

For golang/go#39782.
For golang/go#45336.

Change-Id: I3536d5716b048722fe36e905b182a0a4972b9bc3
Reviewed-on: https://go-review.googlesource.com/c/build/+/306649
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
@gopherbot
Copy link

Change https://golang.org/cl/355312 mentions this issue: cmd/buildlet: add Makefile target for darwin/arm64

gopherbot pushed a commit to golang/build that referenced this issue Oct 12, 2021
This target updates the buildlet binary used by builders that
test the darwin/arm64 port (i.e., darwin-arm64-11_0-toothrot).

Updates golang/go#39782.

Change-Id: I9247c822a7a103bcc016e81664c67b2fbaa32e03
Reviewed-on: https://go-review.googlesource.com/c/build/+/355312
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
@golang golang locked and limited conversation to collaborators Oct 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. new-builder OS-Darwin release-blocker
Projects
None yet
Development

No branches or pull requests

9 participants