wasmtime: yanix v0.12.0 (/tmp/wasmtime/crates/wasi-common/yanix) fails to compile on armv7-unknown-linux-gnueabihf
git clone the repo, cd wasmtime/crates/wasi-common/yanix and execute cargo build fails with this beauty:
crates/wasi-common/yanix $ cargo build
Updating crates.io index
Downloaded cfg-if v0.1.10
Downloaded thiserror v1.0.11
Downloaded libc v0.2.67
Downloaded log v0.4.8
Downloaded bitflags v1.2.1
Downloaded thiserror-impl v1.0.11
Downloaded proc-macro2 v1.0.8
Downloaded quote v1.0.2
Downloaded unicode-xid v0.2.0
Downloaded syn v1.0.15
Compiling proc-macro2 v1.0.8
Compiling unicode-xid v0.2.0
Compiling syn v1.0.15
Compiling bitflags v1.2.1
Compiling libc v0.2.67
Compiling log v0.4.8
Compiling cfg-if v0.1.10
Compiling quote v1.0.2
Compiling thiserror-impl v1.0.11
Compiling thiserror v1.0.11
Compiling yanix v0.12.0 (/home/tim/wasmtime/crates/wasi-common/yanix)
error[E0308]: try expression alternatives have incompatible types
--> crates/wasi-common/yanix/src/file.rs:247:23
|
247 | let offset: i64 = Errno::from_result(libc::lseek(fd, 0, libc::SEEK_CUR))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| expected `i64`, found `i32`
| help: you can convert an `i32` to `i64`: `Errno::from_result(libc::lseek(fd, 0, libc::SEEK_CUR))?.into()`
error[E0277]: the trait bound `i32: std::convert::From<i64>` is not satisfied
--> crates/wasi-common/yanix/src/sys/linux/mod.rs:10:17
|
10 | Ok(Self(loc))
| ^^^ the trait `std::convert::From<i64>` is not implemented for `i32`
|
= help: the following implementations were found:
<i32 as std::convert::From<bool>>
<i32 as std::convert::From<i16>>
<i32 as std::convert::From<i8>>
<i32 as std::convert::From<std::num::NonZeroI32>>
and 2 others
= note: required because of the requirements on the impl of `std::convert::Into<i32>` for `i64`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0277, E0308.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `yanix`.
aarch64 seems fine.
rustc is v1.41.1 with llvm-9
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (15 by maintainers)
That’s right, the yanix crate does now compile just fine. Thank you for helping with this! 👍