fixed build script to match the libbpf name that BCC uses: libbcc_bpf.so #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested on Ubuntu 18.04/Linux 4.15.0 with latest BCC installed.
Ran commands:
There's a libbpf.so file in /lib/x86_64-linux-gnu/, so I tried linking that first (like an idiot). Didn't work because BCC has their own BPF functions that are helpful. Looked for libbpf.so in the intended location and found a file named libbcc_bpf.so.
Changed the name in build.sh, and now it compiles and runs.
Have you done any looking into how this might be run without the BCC libraries? I'm trying to understand how to just use the kernel headers and libraries. Or, at least, be able to run a C program with just a few files that it depends on rather than having to install the entire BCC ecosystem.
The article and the repo are amazing! Even two years later it's one of the best resources on working with low-level BPF that I've been able to find.