Skip to content

Build failure with 0.30.1 on s390x #2683

@Kladki

Description

@Kladki

When trying to build a package that depends on nix 0.30.1 on an s390x system, I get the following errors:

error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/statfs.rs:306:16
    |
306 |         FsType(self.0.f_type)
    |         ------ ^^^^^^^^^^^^^ expected `u64`, found `u32`
    |         |
    |         arguments to this struct are incorrect
    |
note: tuple struct defined here
   --> /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/statfs.rs:94:12
    |
 94 | pub struct FsType(pub fs_type_t);
    |            ^^^^^^
help: you can convert a `u32` to a `u64`
    |
306 |         FsType(self.0.f_type.into())
    |                             +++++++
error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/statfs.rs:345:9
    |
344 |     pub fn optimal_transfer_size(&self) -> libc::c_ulong {
    |                                            ------------- expected `u64` because of return type
345 |         self.0.f_bsize
    |         ^^^^^^^^^^^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
345 |         self.0.f_bsize.into()
    |                       +++++++
error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/statfs.rs:401:9
    |
400 |     pub fn block_size(&self) -> libc::c_ulong {
    |                                 ------------- expected `u64` because of return type
401 |         self.0.f_bsize
    |         ^^^^^^^^^^^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
401 |         self.0.f_bsize.into()
    |                       +++++++
error[E0308]: mismatched types
   --> /home/buildozer/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/nix-0.30.1/src/sys/statfs.rs:485:9
    |
484 |     pub fn maximum_name_length(&self) -> libc::c_ulong {
    |                                          ------------- expected `u64` because of return type
485 |         self.0.f_namelen
    |         ^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
485 |         self.0.f_namelen.into()
    |                         +++++++
For more information about this error, try `rustc --explain E0308`.
error: could not compile `nix` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...

Non-default features enabled: "user", "fs"

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