From 3a0be0a85c056afe35880262b27f64d6829088e2 Mon Sep 17 00:00:00 2001 From: Haojian Zhuang Date: Fri, 8 Mar 2024 14:50:43 +0800 Subject: [PATCH] fix missing blazesym head file There're some updates in Makefile in commit 4b207312dd. But it's not synchronized into CMakeLists.txt. It causes the error in below. 77%] Building C object CMakeFiles/profile.dir/profile.c.o libbpf-bootstrap/examples/c/profile.c:17:10: fatal error: blazesym.h: No such file or directory 17 | #include "blazesym.h" | ^~~~~~~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/profile.dir/build.make:84: CMakeFiles/profile.dir/profile.c.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:520: CMakeFiles/profile.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 Signed-off-by: Haojian Zhuang --- examples/c/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt index ad73004c..b9ebb37e 100644 --- a/examples/c/CMakeLists.txt +++ b/examples/c/CMakeLists.txt @@ -42,7 +42,7 @@ if(CARGO_EXISTS) PREFIX blazesym SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym CONFIGURE_COMMAND "" - BUILD_COMMAND cargo build --release + BUILD_COMMAND cargo build --package=blazesym-c --release BUILD_IN_SOURCE TRUE INSTALL_COMMAND "" STEP_TARGETS build @@ -89,8 +89,8 @@ foreach(app ${apps}) target_link_libraries(${app_stem} ${app_stem}_skel) if(${app_stem} STREQUAL profile) target_include_directories(${app_stem} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/include) + ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/capi/include) target_link_libraries(${app_stem} - ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/target/release/libblazesym.a -lpthread -lrt -ldl) + ${CMAKE_CURRENT_SOURCE_DIR}/../../blazesym/target/release/libblazesym_c.a -lpthread -lrt -ldl) endif() endforeach()