Re: Building perf with BUILD_BPF_SKEL=1 by default
From: Song Liu <hidden>
Date: 2021-12-03 19:40:58
Also in:
lkml
On Dec 3, 2021, at 6:23 AM, Arnaldo Carvalho de Melo [off-list ref] wrote: Em Fri, Dec 03, 2021 at 10:28:00AM -0300, Arnaldo Carvalho de Melo escreveu:quoted
Em Fri, Dec 03, 2021 at 10:10:42AM -0300, Arnaldo Carvalho de Melo escreve
[...]
CLANG /tmp/build/perf/util/bpf_skel/.tmp/bperf_cgroup.bpf.o
CLANG /tmp/build/perf/util/bpf_skel/.tmp/bperf_follower.bpf.o
util/bpf_skel/bpf_prog_profiler.bpf.c:18:21: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_perf_event_value'
__uint(value_size, sizeof(struct bpf_perf_event_value));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/build/perf/libbpf/include/bpf/bpf_helpers.h:13:39: note: expanded from macro '__uint'
#define __uint(name, val) int (*name)[val]
^~~
/tmp/build/perf/libbpf/include/bpf/bpf_helper_defs.h:7:8: note: forward declaration of 'struct bpf_perf_event_value'
struct bpf_perf_event_value;
^
util/bpf_skel/bpf_prog_profiler.bpf.c:26:21: error: invalid application of 'sizeof' to an incomplete type 'struct bpf_perf_event_value'
__uint(value_size, sizeof(struct bpf_perf_event_value));
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~I guess the vmlinux.h fix should also resolve this one? Thanks, Song