-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Building substrate on your Apple M1 machine #10203
Comments
No idea what do you you mean. I've been compiling with Apple M1 natively for almost a year. |
As @xlc said it works + this is an upstream "bug" stepancheg/rust-protobuf#556 You can just install protoc. |
@xlc @bkchr Thank you for your comments. Looks like either installing Rosetta 2 itself was the key or I had observed a temporary issue. Today I updated my rust and did a native build and it worked. @xlc you may have had Rosetta 2 installed and that's why you never noticed it, so people with a fresh machine might be more prone to bump into this. By the way, if it's been stable for a while would you @bkchr consider updating the warning information about Apple M1 builds here: https://docs.substrate.io/v3/getting-started/installation/? |
|
Try make sure everything is native including terminal and homebrew. Use |
This is on a completely clean 14" MBP - haven't knowingly touched Rosetta. |
( |
Also ran into this. Just install rosetta2 with |
Would be nice if you do this. You can just open a pr from the wiki page :) |
@bkchr Can you please point me to the github repository which keeps the content for doc.substrate.io? The substrate wiki has now got only links to that website. |
@aliXsed there should be an edit button on that page which takes you here: Repo: https://github.com/substrate-developer-hub/substrate-docs/ |
* Update setup guide for Apple M1 Remove the previous outdated advice and add rosetta 2 requirement. See the discussion here: paritytech/substrate#10203 * Update v3/docs/01-getting-started/c-installation/index.mdx * Update v3/docs/01-getting-started/c-installation/index.mdx Co-authored-by: Dan Shields <[email protected]>
I know Apple M1 as a native host is not yet supported by substrate. However I am creating this issue for those like me who happen to have an apple silicon host and just need to be able to compile and run substrate on their machine. A similar issue was created here but it was about one of the earlier issues with wasmtime in specific which seems to have been resolved by recent wasmtime packages. My own issue was presenting itself as follows:
The workaround that worked for me is an outside the box solution! Why building for the
aarch64-apple-darwin
target when you can build for thex86_64-apple-darwin
target. When Apple Rosetta 2 is installed, you can directly execute the binaries for the previous intel based architectures on your apple machine. You may not get the highest performance but it works smoothly. So What I did was:softwareupdate —install-rosetta
rustup target add x86_64-apple-darwin
rustup set default-host x86_64-apple-darwin
rustup toolchain add stable-x86_64-apple-darwin
(possibly with --force-non-host)rustup toolchain add nightly-x86_64-apple-darwin
(possibly with --force-non-host)rustup default stable-x86_64-apple-darwin
rustup target add wasm32-unknown-unknown --toolchain nightly
Has anyone got a better solution or workaround?
The text was updated successfully, but these errors were encountered: