-
Notifications
You must be signed in to change notification settings - Fork 15
Add support for Apple M1 chips. #10
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
Open
brunobely
wants to merge
2
commits into
YePpHa:master
Choose a base branch
from
brunobely:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the M1 chip uses the
aarch_64
and notx86_64
(https://en.wikipedia.org/wiki/AArch64). I think we need to translate it to useprotoc-${protoVersion}-osx-aarch_64.zip
instead (needs to be added to the list of releases).So the logic should be something like:
arch
is equal tox64
usex86_64
arch
is equal toarm64
useaarch_64
x86_32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds correct. When I saw the
osx-aarch_64
release in v3.20.1 and v3.20.2 but absent in v3.20.3 I assumed they consolidated the macOS release names, but it looks like it was a different issue.Those binaries were just copies of the
x86_64
artifacts, andaarch_64
binaries are only available on or after v21.x: see this commentI followed this commit to upgrade to v3.21.9 (looks like they're referring to it as just 21.9 now).
Looks like the JS implementation is now under https://github.com/protocolbuffers/protobuf-javascript, so the files in https://github.com/protocolbuffers/protobuf/tree/v3.20.3/js mentioned in this comment no longer exist under v21.9. Is that an issue?
As an aside, is there a reason for both Windows links pointing to the win32 release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It lookes like https://github.com/protocolbuffers/protobuf-javascript is needed as I get the following error:
I then downloaded
protoc-gen-js.exe
from https://github.com/protocolbuffers/protobuf-javascript/releases/tag/v3.21.2 put it in the same bin folder asprotoc.exe
. Made sure that thebin
folder was added to the path. However, that just creates another error:I'm not exactly sure what causes that issue. Perhaps it's because it needs a specific version or I'm missing some libraries. But maybe you can try and see whether you can get it to work.
I modified the
protoc
function inindex.js
to automatically add the folder to thePATH
environment:If you're running something other than Windows you probably need to change the separator
;
to:
instead.