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

Error when compiling the ebpf-profiler #17

Open
mingleiw opened this issue Oct 26, 2021 · 1 comment
Open

Error when compiling the ebpf-profiler #17

mingleiw opened this issue Oct 26, 2021 · 1 comment
Assignees

Comments

@mingleiw
Copy link

I am using UBuntu 18.04 and I was able to use bcc/profile.py. When I was trying to make the ebpf-profiler, I ran into the following error:

clang++ --std=c++17 -o perf_profiler perf_profiler.cc -lbcc
/tmp/perf_profiler-0943c5.o: In function `ebpf::BPF::BPF(unsigned int, ebpf::TableStorage*)':
perf_profiler.cc:(.text._ZN4ebpf3BPFC2EjPNS_12TableStorageE[_ZN4ebpf3BPFC2EjPNS_12TableStorageE]+0x56): undefined reference to `ebpf::BPFModule::BPFModule(unsigned int, ebpf::TableStorage*)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:21: recipe for target 'perf_profiler' failed
make: *** [perf_profiler] Error 1

Is this supported by ubuntu?

@nserrino nserrino assigned nserrino and oazizi000 and unassigned nserrino Nov 5, 2021
@yzhao1012
Copy link
Contributor

I stumbled this, and did a quick check.

This should be BCC's version on your host is too new (or too old). I used 0.16.17-3.3 bcc version, and make is OK.
Could you check your bcc version, with:

dpkg -l bcc

If you are using ubuntu. Other OS distros have their own package command for checking version. But you might need to find that yourself.

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

No branches or pull requests

4 participants