Fix protoc support on M1 mac - #20058
Merged
Merged
Conversation
kaos
approved these changes
Oct 20, 2023
huonw
added a commit
that referenced
this pull request
Nov 2, 2023
As pointed out by @huonw in #20107 (comment) Removing support for tool versions on mac because they don't have x86 binaries was premature and can cause regressions for users who are running rosetta. We've recently merged a few changes having to do with trying to make arm binaries available to mac users: - #19945 (shellcheck) This one is fine because it did not drop support for any versions. - #20058 (protoc). This dropped support for the default version on apple silicon. This is an error, because the version seems to work fine with Rosetta. We revert the version-dropping here. - #19940 (coursier). This is very tricky. We dropped support for some old versions, but made new versions available and bumped the default version. To support both native-arm and old versions via rosetta is tricky. Discussed further in https://github.com/pantsbuild/pants/pull/19940/files#r1375420734 For now we revert the coursier fix as discussed in #19940 (comment) in a separate PR: #20120 A fix-forward for coursier is available at #20121 Co-authored-by: Huon Wilson <huon@exoflare.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The known version that comes with pants does not support M1 mac and errors out with:
this is because the published artifact for macos_arm64 for this version of protoc does not actually support arm64 protocolbuffers/protobuf#9893 (comment).
This pr adds default versions for a more recent version of protoc where the Mac M1 artifact works. Tested it with example-codegen. Did not change the default_version.
Outputs of a script to download and get shas/byte count: