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

Docs tweaks: how to install with macOS Silicon / ARM #420

Closed
Eric-Arellano opened this issue Jan 11, 2021 · 5 comments
Closed

Docs tweaks: how to install with macOS Silicon / ARM #420

Eric-Arellano opened this issue Jan 11, 2021 · 5 comments

Comments

@Eric-Arellano
Copy link

Hello, thanks for this excellent project!

Would you be open to a PR to tweak the docs to describe how to build with macOS Silicon? There isn't yet a pre-installed Protoc binary released through GitHub releases (protocolbuffers/protobuf#8062), so I had to brew install protobuf. Looks like I didn't actually have to set PROTOC or PROTOC_INCLUDE; protoc being on the $PATH was sufficient iiuc.

I'd be happy to update some docs. Maybe these places?

  • The below error message. We can maybe detect if on macOS ARM and if so, append a suggestion to install Protoc, e.g. via brew install protobuf?
Failed to find the protoc binary. The PROTOC environment variable is not set, there is no bundled protoc for this platform, and protoc is not in the PATH

Also, the docs from https://docs.rs/prost-build/0.7.0/prost_build/index.html#sourcing-protoc give an example for how to set Protoc via homebrew, but it looks like Homebrew has (recently?) changed its default install dirs. I'm happy to update this.

PROTOC=/opt/homebrew/bin/protoc
PROTOC_INCLUDE=/opt/homebrew/include

Let me know what would be helpful!

@danburkert
Copy link
Collaborator

Are you running prost 0.6 or 0.7? My understanding is that as of #394 prost-build should ‘just work’, and that PR is included in 0.7. Happy to take a pr to update the brew example if it’s no longer accurate.

@danburkert
Copy link
Collaborator

Actually it appears the /opt location is specific to arm macs: https://docs.brew.sh/Installation

@Eric-Arellano
Copy link
Author

Are you running prost 0.6 or 0.7?

Ah! Indeed, we're using Prost 0.6.1 over at https://github.com/pantsbuild/pants. Sorry I hadn't caught #394 earlier, great to see that included.

Actually it appears the /opt location is specific to arm macs

Interesting, good catch. Thanks! The number of macOS Silicon users is so much lower that it makes sense to stick with the /usr/local path. Lmk if you'd like a tiny PR to clarify in those docs it's for Homebrew on macOS x86.

@Eric-Arellano
Copy link
Author

Ah, another possibility for the Homebrew example:

PROTOC=$(brew --prefix)/bin/protoc
PROTOC_INCLUDE=$(brew --prefix)/include

@danburkert
Copy link
Collaborator

danburkert commented Jan 12, 2021

Ah, another possibility for the Homebrew example:

That's fancy, a PR to that effect would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants