azalea-rs / azalea

A collection of Rust crates for making Minecraft bots, clients, and tools.
https://azalea.matdoes.dev
MIT License
361 stars 48 forks source link

Build failed (E0554, E0658) #131

Closed JewFrags closed 5 months ago

JewFrags commented 5 months ago
error: failed to run custom build command for `azalea v0.9.0 (https://github.com/azalea-rs/azalea#4f288b1c)`

Caused by:
  process didn't exit successfully: `E:\azaleatest\target\debug\build\azalea-f068c0b71e7a1d72\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at C:\Users\Admin\.cargo\git\checkouts\azalea-cdffe42e9d507c39\4f288b1\azalea\build.rs:4:55:
  called `Result::unwrap()` on an `Err` value: NotPresent
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\Admin\.cargo\git\checkouts\simdnbt-6350c7beb21f1e0d\4594562\simdnbt\src\lib.rs:2:12
  |
2 | #![feature(portable_simd)]
  |            ^^^^^^^^^^^^^

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> C:\Users\Admin\.cargo\git\checkouts\simdnbt-6350c7beb21f1e0d\4594562\simdnbt\src\lib.rs:3:12
  |
3 | #![feature(array_chunks)]
  |            ^^^^^^^^^^^^

error[E0658]: use of unstable library feature 'slice_first_last_chunk'
  --> C:\Users\Admin\.cargo\git\checkouts\simdnbt-6350c7beb21f1e0d\4594562\simdnbt\src\mutf8.rs:28:40
   |
28 |         (chunk, remainder) = remainder.split_first_chunk::<16>().unwrap();
   |                                        ^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111774 <https://github.com/rust-lang/rust/issues/111774> for more information

error[E0658]: use of unstable library feature 'slice_first_last_chunk'
  --> C:\Users\Admin\.cargo\git\checkouts\simdnbt-6350c7beb21f1e0d\4594562\simdnbt\src\mutf8.rs:39:40
   |
39 |         (chunk, remainder) = remainder.split_first_chunk::<8>().unwrap();
   |                                        ^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111774 <https://github.com/rust-lang/rust/issues/111774> for more information

error[E0658]: use of unstable library feature 'slice_first_last_chunk'
  --> C:\Users\Admin\.cargo\git\checkouts\simdnbt-6350c7beb21f1e0d\4594562\simdnbt\src\mutf8.rs:50:40
   |
50 |         (chunk, remainder) = remainder.split_first_chunk::<4>().unwrap();
   |                                        ^^^^^^^^^^^^^^^^^
   |
   = note: see issue #111774 <https://github.com/rust-lang/rust/issues/111774> for more information

Some errors have detailed explanations: E0554, E0658.
For more information about an error, try `rustc --explain E0554`.
error: could not compile `simdnbt` (lib) due to 5 previous errors

Here's the main.rs I'm using. https://pastebin.com/AAAKEf0A

And Cargo.toml. https://pastebin.com/suyEb2vd

(Also I did:

rustup install nightly
rustup default nightly
rustup override set nightly

And I'm using cargo build)

mat-1 commented 5 months ago

That error shows up when it's not using nightly. Try doing cargo clean and rebuilding, or if that doesn't work try adding a rust-toolchain file to your project like this one: https://github.com/azalea-rs/azalea/blob/main/rust-toolchain

JewFrags commented 5 months ago

Thanks, worked after a few tries.