Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure for i686-unknown-hurd-gnu #2306

Open
asomers opened this issue Feb 4, 2024 · 1 comment
Open

Build failure for i686-unknown-hurd-gnu #2306

asomers opened this issue Feb 4, 2024 · 1 comment

Comments

@asomers
Copy link
Member

asomers commented Feb 4, 2024

Due to bytecodealliance/rustix#1007 , the Nix CI build fails for i686-unknown-hurd-gnu .

> cargo check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --all-targets
    Checking rustix v0.38.31
error[E0609]: no field `st_atime` on type `&libc::stat64`
   --> /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.31/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`
   --> /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.31/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`
   --> /home/somers/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustix-0.38.31/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

As a hobby OS, I think we should permanently remove it from CI.

@SteveLauC
Copy link
Member

SteveLauC commented Feb 6, 2024

Here is the error I got with the --all-targets option:

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

$ rg "libc" Cargo.toml
31:libc = { version = "0.2.153", features = ["extra_traits"] }

$ cargo +nightly check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --all-targets
    Checking getrandom v0.2.10
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:290:9
    |
290 | /         compile_error!("target is not supported, for more information see: \
291 | |                         https://docs.rs/getrandom/#unsupported-targets");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:341:9
    |
341 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

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

With the --lib option, it compiles without errors:

$ cargo +nightly check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --lib
    Finished dev [unoptimized + debuginfo] target(s) in 0.02s

With --tests:

$ cargo +nightly check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --tests
    Checking getrandom v0.2.10
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:290:9
    |
290 | /         compile_error!("target is not supported, for more information see: \
291 | |                         https://docs.rs/getrandom/#unsupported-targets");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:341:9
    |
341 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

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

With --examples:

$ cargo +nightly check -Zbuild-std --target i686-unknown-hurd-gnu --all-features --examples
    Checking getrandom v0.2.10
    Checking parking_lot v0.12.1
    Checking tempfile v3.8.0
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:290:9
    |
290 | /         compile_error!("target is not supported, for more information see: \
291 | |                         https://docs.rs/getrandom/#unsupported-targets");
    | |________________________________________________________________________^

error[E0433]: failed to resolve: use of undeclared crate or module `imp`
   --> /home/steve/.cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.2.10/src/lib.rs:341:9
    |
341 |         imp::getrandom_inner(dest)?;
    |         ^^^ use of undeclared crate or module `imp`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...

Update: With libc 0.2.152, I got the same errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants