-
Notifications
You must be signed in to change notification settings - Fork 71
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
failed to open BPF object file: Operation not supported (Android Build via xmake) #77
Comments
Thanks for the report! Would you have a complete minimal C file that I could use to try and reproduce? I've tested on my side with the definition of that map and an empty BPF program, but could observe no issue with the current |
Using libbpf v1.1.0 if that matters I will make minimal c |
On the system there is bpftool v7.0.0 installed:
Get libbpf-bootstrap repo try to compile for Android via xmake according to the readme file:
works. Update the bpftool to v7.1.0
try again to compile via xmake:
failed. Seems like its for all .maps not only ringbuf. |
This made me install xmake and some Android-related packages (I think?), it's not exactly minimal :). So now I can reproduce, but it also fails without even switching to v7.1.0. But then I'm not familiar with |
Scratch that, |
yep, you can run Unfortunately, I'm not very familiar to xmake too, its just what libbpf-bootstrap provided for Android builds. |
The change comes from libbpf. Bisecting between 1.0.0 and 1.1.0 for bpftool (using bpftool 7.0.0), it looks like the issue was introduced in commit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=4fcac46c7e107a93030d19c6ea7b90540fc80b1b (libbpf/libbpf@3cd45b6). I haven't looked at the details. I note that there's a commit fixing that one (libbpf/libbpf@ce8d078) but that doesn't seem helpful here, it's in the version used by the master branch of bpftool, which fails to generate the skeleton as well. |
Should I move the issue to libbpf repo? |
Probably worth involving libbpf folks indeed, it seems likely that any fix to bring will be on libbpf side anyway. But the issue tracker on that repo is mostly to track the work on the GitHub mirror and libbpf CI, what I would recommend is to report directly on the BPF mailing list (see also this doc). Please keep me in copy. You'll get an answer much faster there than by waiting for me to get to the bottom of the issue :). |
I have fixed this error. libbpf/libbpf-bootstrap#237 we can use bpftool 7.2.0 now. |
Thank you! |
I have following map:
under v7.0.0 it works, under v7.1.0 getting an error:
bpftool gen skeleton build/.gens/xxx/android/x86_64/release/rules/bpf/xxx.bpf.o -d -p
The text was updated successfully, but these errors were encountered: