From 6c7de6a25eaa679153032b83eb7bf258df5c336c Mon Sep 17 00:00:00 2001 From: weipeng Date: Thu, 27 Nov 2025 10:50:33 +0800 Subject: [PATCH] examples/c: Fix compile issus with -j20. More than one building task of the libbpf and bpftool will be created with -j20. For the libbpf, several same install step running at the same time will cause the compiling error. See the issus: https://github.com/libbpf/libbpf-bootstrap/issues/354 To solve this, change the dependencies of the external project "xxx" from "xxx-build" to "xxx". Signed-off-by: weipeng --- examples/c/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index de3ff164..a923e749 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -83,7 +83,7 @@ foreach(app ${apps}) # Build object skeleton and depend skeleton on libbpf build bpf_object(${app_stem} ${app_stem}.bpf.c) - add_dependencies(${app_stem}_skel libbpf-build bpftool-build) + add_dependencies(${app_stem}_skel libbpf bpftool) add_executable(${app_stem} ${app_stem}.c) target_link_libraries(${app_stem} ${app_stem}_skel)