esp-rs / esp-idf-template

A "Hello, world!" template of a Rust binary crate for the ESP-IDF framework.
380 stars 45 forks source link

Build error after cargo generate #24

Closed LarryMerino closed 2 years ago

LarryMerino commented 2 years ago

✔ 🤷 Project Name : hello ✔ 🤷 MCU · esp32c3 ✔ 🤷 Rust toolchain (beware: nightly works only for esp32c3!) · nightly ✔ 🤷 ESP-IDF native build version (v4.3.2 = previous stable, v4.4 = stable, v5.0 = development; NOTE: applicable only with cargo build --features native) · v4.4 ✔ 🤷 STD support · true

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/unix/process.rs:166:33
    |
166 |         self.as_inner_mut().uid(id);
    |                                 ^^ expected `u16`, found `u32`
    |
help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit
    |
166 |         self.as_inner_mut().uid(id.try_into().unwrap());
    |                                   ++++++++++++++++++++

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/unix/process.rs:175:33
    |
175 |         self.as_inner_mut().gid(id);
    |                                 ^^ expected `u16`, found `u32`
    |
help: you can convert a `u32` to a `u16` and panic if the converted value doesn't fit
    |
175 |         self.as_inner_mut().gid(id.try_into().unwrap());
    |                                   ++++++++++++++++++++

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/os/unix/process.rs:184:36
    |
184 |         self.as_inner_mut().groups(groups);
    |                                    ^^^^^^ expected `u16`, found `u32`
    |
    = note: expected reference `&[u16]`
               found reference `&[u32]`

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/fd.rs:112:17
    |
112 |                 offset as i64,
    |                 ^^^^^^^^^^^^^ expected `i32`, found `i64`
    |
help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
112 |                 (offset as i64).try_into().unwrap(),
    |                 +             +++++++++++++++++++++

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/fd.rs:179:17
    |
179 |                 offset as i64,
    |                 ^^^^^^^^^^^^^ expected `i32`, found `i64`
    |
help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
179 |                 (offset as i64).try_into().unwrap(),
    |                 +             +++++++++++++++++++++

error[E0308]: mismatched types
   --> /Users/larry/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/unix/fs.rs:969:56
    |
969 |         let n = cvt(unsafe { lseek64(self.as_raw_fd(), pos, whence) })?;
    |                                                        ^^^ expected `i32`, found `i64`
    |
help: you can convert an `i64` to an `i32` and panic if the converted value doesn't fit
    |
969 |         let n = cvt(unsafe { lseek64(self.as_raw_fd(), pos.try_into().unwrap(), whence) })?;
    |                                                           ++++++++++++++++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `std` due to 6 previous errors
warning: build failed, waiting for other jobs to finish...
MabezDev commented 2 years ago

Duplicate of https://github.com/esp-rs/esp-idf-template/issues/22