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

Cargo installation error when using rustc 1.80.0-nightly #74

Closed
m1m1sha opened this issue May 4, 2024 · 5 comments
Closed

Cargo installation error when using rustc 1.80.0-nightly #74

m1m1sha opened this issue May 4, 2024 · 5 comments
Labels
help wanted Extra attention is needed wontfix This will not be worked on

Comments

@m1m1sha
Copy link
Contributor

m1m1sha commented May 4, 2024

使用版本:

cargo 1.80.0-nightly (6087566b3 2024-04-30)
rustup 1.27.0 (bbb9276d2 2024-03-08)
rustc 1.80.0-nightly (d2d24e395 2024-05-03)

使用命令:

cargo install easytier

错误信息:

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> C:\Users\35154\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\curve25519-dalek-4.0.0-rc.3\src\backend\vector\ifma\field.rs:26:5
   |
26 |     _mm256_madd52lo_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-05-02; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> C:\Users\35154\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\curve25519-dalek-4.0.0-rc.3\src\backend\vector\ifma\field.rs:25:9
   |
25 |     use core::arch::x86_64::_mm256_madd52lo_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-05-02; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> C:\Users\35154\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\curve25519-dalek-4.0.0-rc.3\src\backend\vector\ifma\field.rs:34:5
   |
34 |     _mm256_madd52hi_epu64(z.into(), x.into(), y.into()).into()
   |     ^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-05-02; consider upgrading it if it is out of date

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
  --> C:\Users\35154\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\curve25519-dalek-4.0.0-rc.3\src\backend\vector\ifma\field.rs:33:9
   |
33 |     use core::arch::x86_64::_mm256_madd52hi_epu64;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
   = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
   = note: this compiler was built on 2024-05-02; consider upgrading it if it is out of date

error[E0635]: unknown feature `stdsimd`
  --> C:\Users\35154\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\curve25519-dalek-4.0.0-rc.3\src\lib.rs:13:70
   |
13 | #![cfg_attr(all(curve25519_dalek_backend = "simd", nightly), feature(stdsimd))]
   |                                                                      ^^^^^^^

   Compiling terminal_size v0.3.0
   Compiling aead v0.5.2
   Compiling libloading v0.8.3
   Compiling pnet v0.34.0
   Compiling matchit v0.7.3
   Compiling crc-catalog v2.4.0
   Compiling base64 v0.22.1
   Compiling network-interface v1.1.4
Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `curve25519-dalek` (lib) due to 5 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile `easytier v1.0.0`, intermediate artifacts can be found at `C:\Users\35154\AppData\Local\Temp\cargo-install4k0ubR`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
@KKRainbow
Copy link
Member

可以帮忙用 1.75 试一下么

@KKRainbow
Copy link
Member

我用 rust 1.80 复现出来了。我看看

@KKRainbow
Copy link
Member

最新的 stable 的 rust 1.78 是可以编译的。那只能暂时不兼容 nightly 编译哈

@KKRainbow KKRainbow added help wanted Extra attention is needed wontfix This will not be worked on labels May 4, 2024
@m1m1sha m1m1sha changed the title cargo install easytier error Cargo installation error when using rustc 1.80.0-nightly May 5, 2024
m1m1sha added a commit to m1m1sha/EasyTier that referenced this issue May 5, 2024
@m1m1sha
Copy link
Contributor Author

m1m1sha commented May 5, 2024

通过搜索发现curve25519-dalek版本需要大于v4.1.1,来源:oxidecomputer/dice-util#176 (comment)

我发现是由boringtun v0.6.0的依赖导致该错误

easytier v1.0.0
└── boringtun v0.6.0
    └── x25519-dalek v2.0.0-rc.3  ---> ^2.0.0
        └── curve25519-dalek v4.0.0-rc.3

但是boringtun的仓库中已使用x25519-dalek v2.0.0,可以通过锁定boringtun的git库来修复该问题

easytier cargo.toml
- boringtun = { version = "0.6.0", optional = true }
+ boringtun = { git = "https://github.com/cloudflare/boringtun.git#f672bb6c", optional = true }

@m1m1sha
Copy link
Contributor Author

m1m1sha commented May 5, 2024

已提交pr

m1m1sha added a commit to m1m1sha/EasyTier that referenced this issue May 5, 2024
KKRainbow pushed a commit that referenced this issue May 5, 2024
* 🐞 fix: 修复 1.80 nightly 编译错误错误

TODO: need fork boringtun and publish to crates.io before publishing easytier 

issues: #74
@m1m1sha m1m1sha closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants