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

Failed to compile ring under nightly Rust (1.61.0, 9f4dc0b4d 2022-03-23) #1469

Closed
zjp-CN opened this issue Mar 24, 2022 · 8 comments · Fixed by #1470
Closed

Failed to compile ring under nightly Rust (1.61.0, 9f4dc0b4d 2022-03-23) #1469

zjp-CN opened this issue Mar 24, 2022 · 8 comments · Fixed by #1470

Comments

@zjp-CN
Copy link
Contributor

zjp-CN commented Mar 24, 2022

Hi, after I rustup update today and cargo clean my project, I get the following issue:

    Checking ring v0.16.20
error: no rules expected the token `aarch64_apple`
   --> /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/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`
   --> /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/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`
   --> /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/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
   --> /root/.cargo/registry/src/rsproxy.cn-8f6827c7555bfaf8/ring-0.16.20/src/cpu.rs:235:41
    |
235 |             if self.mask == self.mask & ARMCAP_STATIC {
    |                                         ^^^^^^^^^^^^^ not found in this scope

This happens under the latest nightly Rust (1.61.0, 9f4dc0b4d 2022-03-23), and I'm not sure if it's ok to report here.

I don't use ring crate as a direct dependency in my project, and I always use nightly Rust.

When I switch to stable Rust, everything goes pretty well just like before rustup updates.

Here is the rustup info:

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.59.0 (9d1b2106e 2022-02-23)
  nightly-x86_64-unknown-linux-gnu updated - rustc 1.61.0-nightly (9f4dc0b4d 2022-03-23) (from rustc 1.61.0-nightly (6a7055661 2022-02-27))

Thank you.

@takkuumi
Copy link

+1

@EGORAGANIN
Copy link

Actually for me

@Mr-Leshiy
Copy link

Also actual for me input-output-hk/jormungandr#3712

@zjp-CN
Copy link
Contributor Author

zjp-CN commented Mar 24, 2022

I've opened a PR #1470, and made some comments there.
I'm not an expert on Rust, actually I'm an amateur programmer, and this is what I can do for now.

@soulmachine
Copy link

@bstrie
Copy link

bstrie commented Mar 25, 2022

Rust developers are aware of the regression and anticipate a fix will land soon: rust-lang/rust#95267 (comment)

orhun added a commit to orhun/git-cliff that referenced this issue Mar 26, 2022
Temporary fix until the `ring` build issue is fixed.

- briansmith/ring#1469
- rust-lang/rust#95267
orhun added a commit to orhun/git-cliff that referenced this issue Mar 26, 2022
Temporary fix until the `ring` build issue is fixed.

- briansmith/ring#1469
- rust-lang/rust#95267
@briansmith
Copy link
Owner

Thanks for the bug report, and thanks for linking to the rust-lang/rust issue.

(rust-lang/rust@9967594) was committed, which should fix this in the next Rust Nigthly or the Nightly after that. I will leave this open until we've verified that.

@zjp-CN
Copy link
Contributor Author

zjp-CN commented Mar 29, 2022

This issue is solved by rust-lang/rust#95390, and ring works fine with the newest nightly Rust.

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

Successfully merging a pull request may close this issue.

7 participants