heim-rs / heim

Cross-platform async library for system information fetching 🦀
https://heim-rs.github.io/
Apache License 2.0
904 stars 96 forks source link

Compilation on aarch64 (arm) fails: expected `i32`, found `i64` #269

Open mrusme opened 4 years ago

mrusme commented 4 years ago
error[E0308]: mismatched types
  --> /home/user/.cargo/registry/src/github.com-1ecc6299db9ec823/heim-host-0.0.10/src/sys/linux/users/other.rs:79:25
   |
79 |             session_id: entry.ut_session,
   |                         ^^^^^^^^^^^^^^^^ expected `i32`, found `i64`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: could not compile `heim-host`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `bottom v0.4.7`, intermediate artifacts can be found at `/tmp/cargo-install1nVP67`
svartalf commented 4 years ago

Hi, @mrusme!

i686 and x86_64 are the only architectures supported right now (see platforms support page for details), but if anyone wants to fix this issue and ensure that CI correctly compiles heim for your arch, I'll be happy to review the PR.

Some ARM targets are already tested in CI, can you elaborate on what target do you use?

https://github.com/heim-rs/heim/blob/b8491b68a4cf493a799b660fe800b981093f997e/.github/workflows/ci.yml#L65-L73

ghost commented 4 years ago

I get this issue on aarch64-unknown-linux-gnu debian-buster

Ella-0 commented 4 years ago

I have the same issue on aarch64-unknown-linux-gnu on rpi4 running archlinuxarm

ghost commented 4 years ago

Fails with aarch64-unknown-linux-gnu on NixOS unstable using binfmt+qemu-user-static

ghost commented 4 years ago

This is a duplicate of https://github.com/heim-rs/heim/issues/207

ghost commented 4 years ago

I successfully compiled bottom for aarch64-unknown-linux-gnu by cherry-picking https://github.com/heim-rs/heim/commit/98a347029bf5fffe73acb8719e21a1bfd1667f22 on top of 0.10.0 and changing bottom to use that.