-
Notifications
You must be signed in to change notification settings - Fork 49
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
Will you consider supporting it on Android? #73
Comments
Hi – sounds fine theoretically, but I don't know anything about Android development. Does it mean adding lots of Android-specific build system stuff? |
|
Hey, bumping this issue :) I personally managed to make it compile by specifying: [target.aarch64-linux-android.libbpf]
rustc-link-lib = ["static=bpf", "static=elf", "z"]
[target.x86_64-linux-android.libbpf]
rustc-link-lib = ["static=bpf", "static=elf", "z"] in my The main issues I had to solve:
It seems to me that there are 3 possible solutions:
IMHO the last solution would be the most reasonable one, and it can also be gated behind a crate feature to not interfere with "normal" builds I'll try to work on a PR to see if there is anything that I missed. I'd like to hear your thoughts on the idea :) |
My approach was just to add the missing macros and some header files, then it started working. |
That's awesome! As a side note, it seems that the XMake repo for libbpf is unmaintained for quite some time (it uses libbpf version 0.3) 👎 |
It seems that running ./configure directly does not have any impact. Yes, I removed the make-based compilation method and instead used the cc library for compilation. I have committed the code to a forked branch. Due to the significant changes I made, I am not sure if the pull request will be accepted repo: https://github.com/editso/libbpf-sys-android/tree/android |
Hi, I tried to build for Android, but the build failed. Does it support Android? If possible, can I create a PR to support it?
The text was updated successfully, but these errors were encountered: