ivmarkov/rust-esp32-std-demo

Can't build rustix dependency for xtensa-esp32-espidf

libbkmz opened this issue · 1 comments

Hello.

I've tried the whole process from scratch multiple times, in Ubuntu and ArchLinux, and even with a clean installation. The result is the same every time.

Here is the gist with full output from cargo build: https://gist.github.com/libbkmz/f026fd1650f270ac82e6c9340b0c2760
A short list of errors:

error[E0432]: unresolved import `super::super::offset::libc_posix_fadvise`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.37.3/src/backend/libc/fs/syscalls.rs:19:5
   |
19 | use super::super::offset::libc_posix_fadvise;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `libc_posix_fadvise` in `backend::offset`

error[E0432]: unresolved import `super::super::offset::libc_posix_fallocate`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.37.3/src/backend/libc/fs/syscalls.rs:31:5
   |
31 | use super::super::offset::libc_posix_fallocate;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `libc_posix_fallocate` in `backend::offset`

error[E0432]: unresolved imports `super::super::offset::libc_fstatfs`, `super::super::offset::libc_statfs`
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.37.3/src/backend/libc/fs/syscalls.rs:40:28
   |
40 | use super::super::offset::{libc_fstatfs, libc_statfs};
   |                            ^^^^^^^^^^^^  ^^^^^^^^^^^ no `libc_statfs` in `backend::offset`
   |                            |
   |                            no `libc_fstatfs` in `backend::offset`
   |
help: a similar name exists in the module
   |
40 | use super::super::offset::{libc_fstatvfs, libc_statfs};
   |                            ~~~~~~~~~~~~~
help: a similar name exists in the module
   |
40 | use super::super::offset::{libc_fstatfs, libc_statvfs};
   |                                          ~~~~~~~~~~~~



error[E0308]: mismatched types
   --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/rustix-0.37.3/src/backend/libc/time/types.rs:127:17
    |
127 |     Monotonic = c::CLOCK_MONOTONIC,
    |                 ^^^^^^^^^^^^^^^^^^ expected `i32`, found `u32`

error: could not compile `rustix` due to 230 previous errors

Here is the complete list of steps I do:

cargo install espup
espup install
. ~/export-esp.sh
rustup default esp
cargo install ldproxy
git clone https://github.com/ivmarkov/rust-esp32-std-demo
cd rust-esp32-std-demo
cargo build

Yeah - and the CI is failing since several days.

TL;DR: Re-pull from rust-esp32-std-demo and the problem should be addressed.

Long story: The culprit is that the async-io crate has switched to Rustix in its latest release (1.13). Until we patch Rustix and upstream the changeset, we need to pin the project to use async-io V.12. Which I just did in Cargo.toml.