Skip to content

std no longer compiles for riscv32imc-esp-espidf #95924

Closed
@bugadani

Description

@bugadani

I'm trying to cross-copmile for an espidf target from Windows, but in the latest nightly compilation (or in this case, cargo c) fails with the following errors:

cargo c --target=riscv32imc-esp-espidf -Z build-std=std,panic_abort

error[E0308]: mismatched types
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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
   --> C:\Users\bugad\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\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) })?;
    |                                                           ++++++++++++++++++++

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions