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

support on aarch64-linux-android #9

Open
b-ripper opened this issue Aug 22, 2022 · 2 comments
Open

support on aarch64-linux-android #9

b-ripper opened this issue Aug 22, 2022 · 2 comments

Comments

@b-ripper
Copy link

b-ripper commented Aug 22, 2022

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.
@viveksjain
Copy link
Contributor

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.

@boguscoder
Copy link

boguscoder commented May 4, 2024

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

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

No branches or pull requests

3 participants