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

Apple Silicon - Build failed #291

Closed
chrstnwhlrt opened this issue May 6, 2021 · 7 comments
Closed

Apple Silicon - Build failed #291

chrstnwhlrt opened this issue May 6, 2021 · 7 comments

Comments

@chrstnwhlrt
Copy link

Fails to build on a Macbook Pro M1 (Apple Silicon, arm64)

  1. Clone Repo
  2. cargo build
Compiling signal-crypto v0.1.0 (/Users/christianwohlert/Development/libsignal-client/rust/crypto)
error[E0412]: cannot find type `poly64_t` in this scope
  --> rust/crypto/src/polyval/polyval_pmul.rs:42:19
   |
42 |           let poly: poly64_t = cast(0xc200000000000000u64);
   |                     ^^^^^^^^ help: a struct with a similar name exists: `poly16x4_t`

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> rust/crypto/src/lib.rs:6:38
  |
6 | #![cfg_attr(target_arch = "aarch64", feature(stdsimd))]
  |                                      ^^^^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> rust/crypto/src/lib.rs:7:38
  |
7 | #![cfg_attr(target_arch = "aarch64", feature(aarch64_target_feature))]
  |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0412, E0554.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `signal-crypto`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
@jrose-signal
Copy link
Contributor

We don't currently support building with stable (but see #284). If you install the toolchain provided in rust-toolchain, do you get the same errors?

@carlocab
Copy link

carlocab commented May 25, 2021

IIUC you require the nightly-2020-11-09 rustc, which predates Apple Silicon support (added in Rust 1.49), so that won't work for Apple Silicon either.

Are there plans to support building with a stable version of the Rust toolchain?

@jrose-signal
Copy link
Contributor

"We don't currently support building with stable" hasn't changed, but we can roll forward to a new nightly soon. (We don't have time for it right now, but soon, along with updating dependencies.)

@jrose-signal
Copy link
Contributor

#323 includes the new nightly and explicit testing of the M1 iOS simulator, so I suspect everything should work with an M1 host now. Can you verify?

@chrstnwhlrt
Copy link
Author

Thanks for the responses, I tried to build it today with a new issue:

   Compiling polyval v0.5.1
   Compiling ctr v0.7.0
error[E0554]: `#![feature]` may not be used on the stable release channel
  --> /Users/christianwohlert/.cargo/registry/src/github.com-1ecc6299db9ec823/polyval-0.5.1/src/lib.rs:80:5
   |
80 |     feature(stdsimd, aarch64_target_feature)
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: could not compile `polyval`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed

Looks like polyval is still missing Apple Silicon support - I will try to create an issue there.

@chrstnwhlrt
Copy link
Author

Polyval (https://github.com/RustCrypto/universal-hashes/tree/master/polyval) is building quite fine even with older tags

@chrstnwhlrt
Copy link
Author

Changing the installation method to the office rustup (used homebrew before) solved the issue - it's now building fine using the stable channel of rust: rustc 1.53.0 (53cb7b09b 2021-06-17)

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

No branches or pull requests

3 participants