ClementTsang / bottom

Yet another cross-platform graphical process/system monitor.
https://clementtsang.github.io/bottom/
MIT License
9.4k stars 221 forks source link

Test more ARM builds #267

Closed ClementTsang closed 3 years ago

ClementTsang commented 3 years ago

With more and more ARM focus it's probably worth adding more ARM testing+support in the future for macOS and Windows. Currently we're only checking Linux on ARM, and it's not an official support.

Since this is a very new thing still, it'll probably take a while for this to be able to be done.

Probably take a look at https://github.com/rust-embedded/cross or https://github.com/japaric/trust to avoid having to deal with Travis support nightmares like last time?

z0mb1e-kgd commented 3 years ago

I run Arch Linux ARM on Orange Pi One (ARMv7) SBC. I got bottom v0.4.7-0 compiled once without any problem, error or warning from AUR through yay (natively on the device itself, not cross-compiled), yet I get 'memchr -> error: linker arm-linux-gnueabihf-gcc not found' now when I try to update it to the newer versions. Could you please advise?

ClementTsang commented 3 years ago

@z0mb1e-kgd Don't have an Arch ARM setup right now, but I would try one of these:

heitbaum commented 3 years ago

Tested on Odroid N2 with #376 PR and cross compiled from x86_64

odroid:~ # btm -V bottom 0.5.7

=== tested on ===
AMLGX.aarch64-devel-20210212111004-6d60364
Linux odroid 5.11.0-rc7 #1 SMP PREEMPT Fri Feb 12 11:10:21 UTC 2021 aarch64 GNU/Linux
Platform: Linux ARM 64-bit
compiled 2021-02-12 by GCC 10.2.0 for Linux ARM 64-bit version 5.11.0 (330496)
Running on Amlogic Meson G12B (S922X) Hardkernel ODROID-N2Plus with LibreELEC (heitbaum): devel-20210212111004-6d60364 9.80, kernel: Linux ARM 64-bit version 5.11.0-rc7
Host CPU: ARMv8 Processor rev 2 (v8l), 6 cores available
ARM Features: Neon enabled

NAME="LibreELEC"
VERSION="devel-20210212111004-6d60364"
ID="libreelec"
VERSION_ID="9.80"
PRETTY_NAME="LibreELEC (heitbaum): devel-20210212111004-6d60364"
HOME_URL="https://libreelec.tv"
BUG_REPORT_URL="https://github.com/heitbaum/LibreELEC.tv"
BUILD_ID="6d603649add6fbf185543afc89fcae225ef11cd1"
LIBREELEC_ARCH="AMLGX.aarch64"
LIBREELEC_BUILD="heitbaum"
LIBREELEC_PROJECT="Amlogic"
LIBREELEC_DEVICE="AMLGX"
BUILDER_NAME="heitbaum"
kidonng commented 3 years ago

I'm trying to submit bottom to Homebrew's official tap (Homebrew/homebrew-core#72061), but seems like we have to wait for helm to support ARM, just like #191.

ClementTsang commented 3 years ago

@kidonng Hm, that's weird. heim does support building ARM (even if it's not officially supported), and it usually works fine in my CI tests + builds, which do try to build ARM on a few platforms.

I just tried adding macOS's aarch64 build target to my CI and it manages to build fine as well, though I used cross to test this and it might be too different from your current scenario.

I'm not very familiar with homebrew/macOS environments for ARM, but you might have to link against something in order to properly compile it in an ARM environment on macOS? I'm not really sure tbh.

wouterds commented 3 years ago

This should work on a Raspberry Pi then? Somewhere in the future?

z0mb1e-kgd commented 3 years ago

could you see if removing:

  [target.armv7-unknown-linux-gnueabihf]
  linker = "arm-linux-gnueabihf-gcc"

from .cargo/cargo.toml fixes it?

Sorry for a late reply. I built it from AUR, so I had to patch cargo.toml with sed on-the-fly, but this made it! It compiled well.

ClementTsang commented 3 years ago

This should work on a Raspberry Pi then? Somewhere in the future?

It does (at least on a Pi 4), but from my experience, the drive read/write doesn't work. Everything else seems fine.

wouterds commented 3 years ago

It does (at least on a Pi 4), but from my experience, the drive read/write doesn't work. Everything else seems fine.

Ah I didn't see the armv7 tar file, works indeed, thanks!