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

Build fails on Apple Silicon #880

Closed
MaxDesiatov opened this issue Nov 14, 2020 · 4 comments
Closed

Build fails on Apple Silicon #880

MaxDesiatov opened this issue Nov 14, 2020 · 4 comments

Comments

@MaxDesiatov
Copy link

Steps to reproduce:

  1. Install the Apple Silicon build of Rust with rustup
arch --x86_64 \      
sh <(curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs) \
--default-host aarch64-apple-darwin \
--default-toolchain nightly
  1. Build sccache from source with cargo install sccache

The build fails with this error:

error: failed to run custom build command for `byteorder v1.3.4`

Caused by:
  process didn't exit successfully: `/var/folders/k3/81_y5ms54793cngfpdw7_7d40000gn/T/cargo-installRR4GjT/release/build/byteorder-a8c8926e64734017/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `sccache v0.2.13`, intermediate artifacts can be found at `/var/folders/k3/81_y5ms54793cngfpdw7_7d40000gn/T/cargo-installRR4GjT`
@luser
Copy link
Contributor

luser commented Nov 16, 2020

Sounds like this needs to be filed on the byteorder crate, although it might be the case that we need to wait for upstream Rust to ship support for Apple silicon to really be useful. Are you just running the x86 rustc toolchain under emulation?

@MaxDesiatov
Copy link
Author

MaxDesiatov commented Nov 16, 2020

I don't think rustc runs here under emulation. As far as I understand arch --x86_64 is only applied to rustup, which itself isn't available natively yet, but the nightly toolchain should be native? I will double check.

@glandium
Copy link
Collaborator

There's an issue with code signing when going from x86_64 processes to arm64 processes. This will keep happening until rustup itself is arm64 native. A workaround is to use RUSTC=$(rustup which rustc) $(rustup which cargo) install sccache.

Note this is not specific to sccache at all. This happens with essentially everything.

@MaxDesiatov
Copy link
Author

Thanks for the clarification!

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

3 participants