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

fixed build script to match the libbpf name that BCC uses: libbcc_bpf.so #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rtkaratekid
Copy link

Tested on Ubuntu 18.04/Linux 4.15.0 with latest BCC installed.
Ran commands:

git clone https://github.com/bolinfest/opensnoop-native.git
./build.sh

# output
clang: error: no such file or directory: '/usr/lib/x86_64-linux-gnu/libbpf.so'

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.

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

Successfully merging this pull request may close these issues.

1 participant