Comments (12)
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 master
head (or from tag v7.1.0
).
from bpftool.
Using libbpf v1.1.0 if that matters
I will make minimal c
from bpftool.
On the system there is bpftool v7.0.0 installed:
bpftool v7.0.0
using libbpf v1.0
features: libbpf_strict, skeletons
Get libbpf-bootstrap repo
git clone --recurse-submodules https://github.com/libbpf/libbpf-bootstrap
try to compile for Android via xmake according to the readme file:
$ git submodule update --init --recursive # check out libbpf
$ cd examples/c
$ xmake f -p android
$ xmake
works.
Update the bpftool to v7.1.0
git clone --depth 1 --branch v7.1.0 ... && make install
bpftool version
:
bpftool v7.1.0
using libbpf v1.1
features: llvm, skeletons
try again to compile via xmake:
[ 13%]: compiling.bpf uprobe.bpf.c
[ 13%]: compiling.bpf minimal.bpf.c
[ 13%]: compiling.bpf fentry.bpf.c
[ 13%]: compiling.bpf minimal_legacy.bpf.c
[ 17%]: cache compiling.release ../../libbpf/src/libbpf.c
[ 33%]: cache compiling.release ../../libbpf/src/netlink.c
[ 44%]: cache compiling.release ../../libbpf/src/bpf.c
[ 44%]: compiling.bpf bootstrap.bpf.c
libbpf: map 'my_pid_map': unsupported map linkage static.
Error: failed to open BPF object file: Operation not supported
error: execv(bpftool gen skeleton build/.gens/minimal_legacy/android/armeabi-v7a/release/rules/bpf/minimal_legacy.bpf.o) failed(161)
failed.
Seems like its for all .maps not only ringbuf.
from bpftool.
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 xmake
, and not sure what bpftool binary it invoked, it could be picking the one installed on my system. Do you know how I could check what binary xmake
is using, or how I can make it point to a specific binary?
from bpftool.
Scratch that, xmake
gives me the bpftool command that it runs so I can run that directly. Yeah I confirm I see the same, v7.0.0 works but v7.1.0 fails with the same error.
from bpftool.
yep, you can run bpftool gen skeleton build/.gens/minimal_legacy/android/armeabi-v7a/release/rules/bpf/minimal_legacy.bpf.o
on generated object file, it works on 7.0.0 but failes on 7.1.0
Unfortunately, I'm not very familiar to xmake too, its just what libbpf-bootstrap provided for Android builds.
from bpftool.
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.
from bpftool.
Should I move the issue to libbpf repo?
https://github.com/libbpf/libbpf/issues
from bpftool.
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 :).
from bpftool.
see libbpf/libbpf-bootstrap#236
libbpf/libbpf-bootstrap#228 (comment)
from bpftool.
I have fixed this error. libbpf/libbpf-bootstrap#237
we can use bpftool 7.2.0 now.
from bpftool.
Thank you!
from bpftool.
Related Issues (20)
- Print error and exit instead of diplaying an empty map for unsupported map types
- Fix weird indent in documentation HOT 1
- streamline bpftool net dump HOT 1
- "make install" for man pages stops. HOT 1
- Wrong callq address displayed HOT 5
- Error: No JIT disassembly support HOT 2
- "libbpf: map 'xxx': unsupported map linkage static" in Android HOT 7
- Have bpftool return ID of created objects
- Attach programs to tcx HOT 6
- The proper usage of `bpftool prog attach` HOT 2
- BPFTool Prog Loadall command Deletes /sys/fs/cgroup virtual file system directory HOT 3
- bpftool: error while loading shared libraries: libLLVM-17.so: cannot open shared object file: No such file or directory HOT 14
- use bpftool dump this bpf_prog_982904fb4a4dfbdb_tracepoint_sche at 0x8a0/0x1000 how to do it? HOT 1
- Typo: `cgroup/sendmsg°unix` HOT 2
- Check that the list of supported programs, map types, attach types, ... are up-to-date HOT 1
- Dump libbpf's output for `build_obj_refs_table()` when user asks for debug info HOT 2
- When loading eBPF binary with bpftool, the 'bpf_trace_printk' seems no output to '/sys/kernel/debug/tracing/trace_pipe' HOT 8
- bpftool 7.4.0 prog load Segmentation fault (core dumped) HOT 2
- Missing bpffs mount when pinning maps for prog load (`pinmaps`) HOT 6
- Cannot list programs attached to cgroup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bpftool.