powerpc: libbpf: failed to find BTF for extern 'PT_REGS_PARM1': -2
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
(I try to package `libbpf-tools` from `bcc` for ALT Linux.) On ppc64le and aarch64 architectures `libbpf-tools` fail to compile in `GEN-SKEL`, because of `bpftool` error. Actual cause seems to be the clang compilation warnings shown below:
```
builder@powerpc64le:~/RPM/BUILD/bcc-0.18.0/libbpf-tools$ clang -g -O2 -target bpf -D__TARGET_ARCH_ppc64le -I.output -c biosnoop.bpf.c -o .output/biosnoop.bpf.o
biosnoop.bpf.c:65:5: warning: implicit declaration of function 'PT_REGS_PARM1' is invalid in C99 [-Wimplicit-function-declaration]
int BPF_KPROBE(blk_account_io_merge_bio, struct request *rq)
^
.output/bpf/bpf_tracing.h:385:20: note: expanded from macro 'BPF_KPROBE'
return ____##name(___bpf_kprobe_args(args)); \
^
.output/bpf/bpf_tracing.h:365:2: note: expanded from macro '___bpf_kprobe_args'
___bpf_apply(___bpf_kprobe_args, ___bpf_narg(args))(args)
^
.output/bpf/bpf_tracing.h:299:29: note: expanded from macro '___bpf_apply'
#define ___bpf_apply(fn, n) ___bpf_concat(fn, n)
^
.output/bpf/bpf_tracing.h:298:29: note: expanded from macro '___bpf_concat'
#define ___bpf_concat(a, b) a ## b
^
:18:1: note: expanded from here
___bpf_kprobe_args1
^
.output/bpf/bpf_tracing.h:355:33: note: expanded from macro '___bpf_kprobe_args1'
___bpf_kprobe_args0(), (void *)PT_REGS_PARM1(ctx)
^
biosnoop.bpf.c:65:5: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
.output/bpf/bpf_tracing.h:385:20: note: expanded from macro 'BPF_KPROBE'
return ____##name(___bpf_kprobe_args(args)); \
^
.output/bpf/bpf_tracing.h:365:2: note: expanded from macro '___bpf_kprobe_args'
___bpf_apply(___bpf_kprobe_args, ___bpf_narg(args))(args)
^
.output/bpf/bpf_tracing.h:299:29: note: expanded from macro '___bpf_apply'
#define ___bpf_apply(fn, n) ___bpf_concat(fn, n)
^
.output/bpf/bpf_tracing.h:298:29: note: expanded from macro '___bpf_concat'
#define ___bpf_concat(a, b) a ## b
^
:18:1: note: expanded from here
___bpf_kprobe_args1
^
.output/bpf/bpf_tracing.h:355:25: note: expanded from macro '___bpf_kprobe_args1'
___bpf_kprobe_args0(), (void *)PT_REGS_PARM1(ctx)
^
2 warnings generated.
builder@powerpc64le:~/RPM/BUILD/bcc-0.18.0/libbpf-tools$ /usr/sbin/bpftool gen skeleton .output/biosnoop.bpf.o > .output/biosnoop.skel.h
libbpf: failed to find BTF for extern 'PT_REGS_PARM1': -2
Error: failed to open BPF object file: No such file or directory
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.