support on aarch64-linux-android
Hi, I found the great tool, and I want to use it on android device.
I installed the android ndk, and then I built wachy:
export CC_aarch64_linux_android=$HOME/Android/toolchains/arm64/bin/aarch64-linux-android30-clang
export AR_aarch64_linux_android=$HOME/Android/toolchains/arm64/bin/aarch64-linux-android-ar
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=$HOME/Android/toolchains/arm64/bin/aarch64-linux-android30-clang
cargo build --target aarch64-linux-android --release
I got the error:
TARGET = Some("aarch64-linux-android")
HOST = Some("x86_64-unknown-linux-gnu")
CC_aarch64-linux-android = None
CC_aarch64_linux_android = Some("/home/ripper/Android/toolchains/arm64/bin/aarch64-linux-android30-clang")
CFLAGS_aarch64-linux-android = None
CFLAGS_aarch64_linux_android = None
TARGET_CFLAGS = None
CFLAGS = None
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
--- stderr
/home/ripper/wachy/target/aarch64-linux-android/release/build/ncurses-905dd36bad61d0d6/out/chtype_size.c:6:10: fatal error: 'ncurses.h' file not found
#include <ncurses.h>
^~~~~~~~~~~
1 error generated.
thread 'main' panicked at 'assertion failed: command.status().expect(\"compilation failed\").success()', /home/ripper/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.101.0/build.rs:105:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
I'm a newer to rust, don't know how to solve the dependency.
That's interesting, I didn't even know android supported eBPF but looks like it does. Unfortunately, I can't really help you there - there are a few dependencies (https://github.com/rubrikinc/wachy#compiling) that wachy has which you'll have to figure out how to compile on android. Also, wachy currently only supports x86-64, aarch64 will require some work. But if you get the other deps working let me know, I could look into it.
I know its fairly old issue, but I wanted to leave a comment for posterity since Ive just tried building wachy for android,
Cross compiling ncurses was one of the easier problems, however wachy has pretty strong dependency on zydis which only exists for x86/64. I was not able to find available alternatives for arm32/arm64 that would be decent substitute.
I'd be happy to help to make this happen its an uphill battle