Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

build error in Mac M1 #326

Closed
VishnuJin opened this issue Mar 24, 2022 · 8 comments
Closed

build error in Mac M1 #326

VishnuJin opened this issue Mar 24, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@VishnuJin
Copy link
Contributor

VishnuJin commented Mar 24, 2022

hey guys, I tried to build our main branch and it throws many errors related to cpu architecture

error: no rules expected the token `aarch64_apple`

Rustup Version

❯ rustup -V                                                                  ─╯
rustup 1.24.3 (2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.59.0 (9d1b2106e 2022-02-23)`

Cargo Version

❯ cargo -V                                                                   ─╯
cargo 1.59.0 (49d8809dc 2022-02-10)

rustup default

❯ rustup default                                                             ─╯
nightly-aarch64-apple-darwin (default)

Full Error Log

❯ make build                                                                 ─╯
cargo build --features cli --bin bindle-server
   Compiling ring v0.16.20
   Compiling crypto-common v0.1.3
   Compiling digest v0.9.0
   Compiling block-buffer v0.9.0
   Compiling block-buffer v0.10.2
   Compiling inout v0.1.2
   Compiling regex v1.5.5
   Compiling flate2 v1.0.22
error: no rules expected the token `aarch64_apple`
   --> /Users/vishnujin/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:257:13
    |
165 |     macro_rules! features {
    |     --------------------- when calling this macro
...
257 |             aarch64_apple: true,
    |             ^^^^^^^^^^^^^ no rules expected this token in macro call

error[E0425]: cannot find value `AES` in module `cpu::arm`
   --> /Users/vishnujin/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/ring-0.16.20/src/aead/aes.rs:381:65
    |
381 |         if cpu::intel::AES.available(cpu_features) || cpu::arm::AES.available(cpu_features) {
    |                                                                 ^^^ not found in `cpu::arm`
    |
help: consider importing this constant
    |
15  | use crate::cpu::intel::AES;
    |

error[E0425]: cannot find value `PMULL` in module `cpu::arm`
   --> /Users/vishnujin/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/ring-0.16.20/src/aead/gcm.rs:315:26
    |
315 |             || cpu::arm::PMULL.available(cpu_features)
    |                          ^^^^^ not found in `cpu::arm`

error[E0425]: cannot find value `ARMCAP_STATIC` in this scope
   --> /Users/vishnujin/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:235:41
    |
235 |             if self.mask == self.mask & ARMCAP_STATIC {
    |                                         ^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find value `ARMCAP_STATIC` in this scope
   --> /Users/vishnujin/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/ring-0.16.20/src/cpu.rs:288:36
    |
288 |     static mut GFp_armcap_P: u32 = ARMCAP_STATIC;
    |                                    ^^^^^^^^^^^^^ not found in this scope

   Compiling serde_derive v1.0.136
   Compiling tokio-macros v1.7.0
   Compiling futures-macro v0.3.21
   Compiling tracing-attributes v0.1.20
   Compiling rand_chacha v0.3.1
For more information about this error, try `rustc --explain E0425`.
error: could not compile `ring` due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
make: *** [build-server] Error 101
@VishnuJin
Copy link
Contributor Author

Building in Rust Stable works fine

@thomastaylor312
Copy link
Contributor

Hmm...we'll have to debug this. Looks like ring is having trouble with stuff, likely due to conditional compilation

@yenicelik
Copy link

Getting the same error. Would appreciate any pointers! :)

@yenicelik
Copy link

Is this a rust-core issue? rust-lang/rust#95267

@VishnuJin
Copy link
Contributor Author

VishnuJin commented Mar 27, 2022

@yenicelik my guess is also the same, for now I can say bindle builds fine in Rust Stable

BTW thanks for linking the issue 👍🏻

❯ rustup default stable                                                      ─╯
info: using existing install for 'stable-aarch64-apple-darwin'
info: default toolchain set to 'stable-aarch64-apple-darwin'

  stable-aarch64-apple-darwin unchanged - rustc 1.59.0 (9d1b2106e 2022-02-23)
❯ make build                                                                 ─╯
cargo build --features cli --bin bindle-server
    Finished dev [unoptimized + debuginfo] target(s) in 0.47s
cargo build --features=cli --bin bindle
    Finished dev [unoptimized + debuginfo] target(s) in 0.09s

@yenicelik
Copy link

yeah rust stable worked indeed. maybe because of the rust update since Feb 24th or something

@thomastaylor312
Copy link
Contributor

Thanks for pointing out that issue @yenicelik! @VishnuJin You ok to close this?

@VishnuJin
Copy link
Contributor Author

@thomastaylor312 yep !!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants