bytecodealliance/rustix

Build failure for i686-unknown-hurd-gnu

asomers opened this issue · 3 comments

With the latest libc dependency, the build fails for i686-unknown-hurd-gnu

> cargo check -Zbuild-std --target i686-unknown-hurd-gnu --features="fs"
   Compiling rustix v0.38.31 (/usr/home/somers/src/rust/rustix)
error[E0609]: no field `st_atime` on type `&libc::stat64`
   --> src/fs/mod.rs:168:14
    |
168 |         self.st_atime as i64
    |              ^^^^^^^^ unknown field
    |
help: a field with a similar name exists
    |
168 |         self.st_atim as i64
    |              ~~~~~~~

error[E0609]: no field `st_mtime` on type `&libc::stat64`
   --> src/fs/mod.rs:172:14
    |
172 |         self.st_mtime as i64
    |              ^^^^^^^^ unknown field
    |
help: a field with a similar name exists
    |
172 |         self.st_mtim as i64
    |              ~~~~~~~

error[E0609]: no field `st_ctime` on type `&libc::stat64`
   --> src/fs/mod.rs:176:14
    |
176 |         self.st_ctime as i64
    |              ^^^^^^^^ unknown field
    |
help: a field with a similar name exists
    |
176 |         self.st_ctim as i64
    |              ~~~~~~~

For more information about this error, try `rustc --explain E0609`.
error: could not compile `rustix` (lib) due to 3 previous errors

For rustix, I got different errors:

$ cargo +nightly --version
cargo 1.78.0-nightly (cdf84b69d 2024-02-02)

$ cargo +nightly check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --all-targets
   Compiling serial_test_derive v2.0.0
    Checking compiler_builtins v0.1.108
    Checking errno v0.3.8
    Checking futures-util v0.3.30
    Checking parking_lot_core v0.9.9
    Checking flate2 v1.0.28
    Checking memoffset v0.9.0
error[E0433]: failed to resolve: could not find `prelude` in `core`

error[E0432]: unresolved import `core::ops`
 --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/src/float/mod.rs:1:5
  |
1 | use core::ops;
  |     ^^^^^^^^^ no `ops` in the root

error[E0432]: unresolved import `core::ops`
 --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/src/int/mod.rs:1:5
  |
1 | use core::ops;
  |     ^^^^^^^^^ no `ops` in the root

error[E0432]: unresolved import `core::intrinsics`
  --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/compiler_builtins-0.1.108/src/mem/mod.rs:11:11
   |
11 | use core::intrinsics::{atomic_load_unordered, atomic_store_unordered, exact_div};
   |           ^^^^^^^^^^ could not find `intrinsics` in `core`

Well, I just realized that the error reported by @asomers comes from this CI log, and we should note that rustix 0.38.31 is using libc 0.2.152, which is not the latest version (0.2.153, released on 2/1/2024)