eunomia-bpf / bpftime

Userspace eBPF runtime for fast Uprobe & Syscall hook & Extensions
https://eunomia.dev/bpftime/
MIT License
744 stars 73 forks source link

[BUG] make release failed in bpftool #142

Closed playsand closed 7 months ago

playsand commented 7 months ago

Describe the bug make release exit error. To Reproduce git clone and make release

Expected behavior

Screenshots

[ 35%] Performing build step for 'bpftool'
make[4]: Entering directory '/data/bule/bpftime/third_party/bpftool/src'
...                        libbfd: [ on  ]
...               clang-bpf-co-re: [ on  ]
...                          llvm: [ OFF ]
...                        libcap: [ OFF ]
skeleton/pid_iter.bpf.c:19:18: error: field has incomplete type 'struct bpf_link'
        struct bpf_link link;
                        ^
skeleton/pid_iter.bpf.c:19:9: note: forward declaration of 'struct bpf_link'
        struct bpf_link link;
               ^
skeleton/pid_iter.bpf.c:48:10: error: incomplete definition of type 'struct bpf_link'
                return BPF_CORE_READ((struct bpf_link *)ent, id);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/bule/bpftime/third_party/bpftool/src/bootstrap/libbpf/include/bpf/bpf_core_read.h:443:2: note: expanded from macro 'BPF_CORE_READ'
        ___type((src), a, ##__VA_ARGS__) __r;                               \

Desktop (please complete the following information):

Additional context

yunwei37 commented 7 months ago

It seems the bpftool build scripts has some issues on old kernel version.

Maybe the problem can be solved like this? https://github.com/jsitnicki/ebpf-summit-2020/issues/1#issuecomment-1014338225

You can also try the docker image in https://eunomia.dev/bpftime/documents/build-and-test/#use-docker-image

playsand commented 7 months ago

ok, thanks.