EasyTier / EasyTier

A simple, decentralized mesh VPN with WireGuard support.
https://easytier.top
Apache License 2.0
472 stars 41 forks source link

Cargo installation error when using rustc 1.80.0-nightly #74

Closed m1m1sha closed 1 month ago

m1m1sha commented 1 month ago

使用版本:

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 commented 1 month ago

可以帮忙用 1.75 试一下么

KKRainbow commented 1 month ago

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

KKRainbow commented 1 month ago

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

m1m1sha commented 1 month ago

通过搜索发现curve25519-dalek版本需要大于v4.1.1,来源:https://github.com/oxidecomputer/dice-util/issues/176#issuecomment-1934447711

我发现是由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 commented 1 month ago

已提交pr