Skip to content

Commit 1fd450f

Browse files
acmelAlexei Starovoitov
authored and
Alexei Starovoitov
committed
libbpf: Fix up generation of bpf_helper_defs.h
$ make -C tools/perf build-test does, ends up with these two problems: make[3]: *** No rule to make target '/tmp/tmp.zq13cHILGB/perf-5.3.0/include/uapi/linux/bpf.h', needed by 'bpf_helper_defs.h'. Stop. make[3]: *** Waiting for unfinished jobs.... make[2]: *** [Makefile.perf:757: /tmp/tmp.zq13cHILGB/perf-5.3.0/tools/lib/bpf/libbpf.a] Error 2 make[2]: *** Waiting for unfinished jobs.... Because $(srcdir) points to the /tmp/tmp.zq13cHILGB/perf-5.3.0 directory and we need '/tools/ after that variable, and after fixing this then we get to another problem: /bin/sh: /home/acme/git/perf/tools/scripts/bpf_helpers_doc.py: No such file or directory make[3]: *** [Makefile:184: bpf_helper_defs.h] Error 127 make[3]: *** Deleting file 'bpf_helper_defs.h' LD /tmp/build/perf/libapi-in.o make[2]: *** [Makefile.perf:778: /tmp/build/perf/libbpf.a] Error 2 make[2]: *** Waiting for unfinished jobs.... Because this requires something outside the tools/ directories that gets collected into perf's detached tarballs, to fix it just add it to tools/perf/MANIFEST, which this patch does, now it works for that case and also for all these other cases. Fixes: e01a75c ("libbpf: Move bpf_{helpers, helper_defs, endian, tracing}.h into libbpf") Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Andrii Nakryiko <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Link: https://lore.kernel.org/bpf/[email protected]
1 parent 53f8dd4 commit 1fd450f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/lib/bpf/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ $(BPF_IN_SHARED): force elfdep bpfdep bpf_helper_defs.h
180180
$(BPF_IN_STATIC): force elfdep bpfdep bpf_helper_defs.h
181181
$(Q)$(MAKE) $(build)=libbpf OUTPUT=$(STATIC_OBJDIR)
182182

183-
bpf_helper_defs.h: $(srctree)/include/uapi/linux/bpf.h
183+
bpf_helper_defs.h: $(srctree)/tools/include/uapi/linux/bpf.h
184184
$(Q)$(srctree)/scripts/bpf_helpers_doc.py --header \
185-
--file $(srctree)/include/uapi/linux/bpf.h > bpf_helper_defs.h
185+
--file $(srctree)/tools/include/uapi/linux/bpf.h > bpf_helper_defs.h
186186

187187
$(OUTPUT)libbpf.so: $(OUTPUT)libbpf.so.$(LIBBPF_VERSION)
188188

tools/perf/MANIFEST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ tools/lib/bitmap.c
1919
tools/lib/str_error_r.c
2020
tools/lib/vsprintf.c
2121
tools/lib/zalloc.c
22+
scripts/bpf_helpers_doc.py

0 commit comments

Comments
 (0)