Skip to content

Error when compiling the ebpf-profiler #17

Open

Description

@mingleiw

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?

Activity

  1. yzhao1012 commented on Jan 13, 2022

    @yzhao1012
    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions