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

Fails to build on s390x with error[E0308]: mismatched types #4298

Closed
sylvestre opened this issue Jan 23, 2023 · 1 comment · Fixed by #4299
Closed

Fails to build on s390x with error[E0308]: mismatched types #4298

sylvestre opened this issue Jan 23, 2023 · 1 comment · Fixed by #4299

Comments

@sylvestre
Copy link
Contributor

@Joining7943 seems that it is caused by c94a039?


   Compiling uucore v0.0.17 (/<<PKGBUILDDIR>>/src/uucore)
error[E0308]: mismatched types
   --> src/uucore/src/lib/features/fsext.rs:624:16
    |
616 |     fn block_size(&self) -> i64 {
    |                             --- expected `i64` because of return type
...
624 |         return self.f_bsize;
    |                ^^^^^^^^^^^^ expected `i64`, found `u32`
    |
help: you can convert a `u32` to an `i64`
    |
624 |         return self.f_bsize.into();
    |                            +++++++

error[E0308]: mismatched types
   --> src/uucore/src/lib/features/fsext.rs:686:16
    |
678 |     fn fs_type(&self) -> i64 {
    |                          --- expected `i64` because of return type
...
686 |         return self.f_type;
    |                ^^^^^^^^^^^ expected `i64`, found `u32`
    |
help: you can convert a `u32` to an `i64`
    |
686 |         return self.f_type.into();
    |                           +++++++

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

Full log:
https://buildd.debian.org/status/fetch.php?pkg=rust-coreutils&arch=s390x&ver=0.0.17-1&stamp=1674426143&raw=0

@Joining7943
Copy link
Contributor

yeah it's definitely since #4238. the risc64 build fails too https://buildd.debian.org/status/fetch.php?pkg=rust-coreutils&arch=riscv64&ver=0.0.17-1&stamp=1674429761&raw=0. I'll try to figure it out. Both s390x and risc64gc would be supported by cross. Should we add them to the ci?

Joining7943 added a commit to Joining7943/uutil-coreutils that referenced this issue Jan 23, 2023
sylvestre added a commit that referenced this issue Jan 24, 2023
…0x-and-risc64

`uucore`: Fix #4298: Fails to build on s390x (and riscv64)
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

Successfully merging a pull request may close this issue.

2 participants