From 507b8f527697fbede2760eaad4f418c5b28a42ea Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 5 May 2024 07:44:53 -0400 Subject: [PATCH] build: Fix shared library build. * driver/CMakeLists.txt (DRIVER_SOURCES): Add missing headers. * userspace/libsinsp/test/CMakeLists.txt (unit-test-libsinsp): Link to libgrpc++ to avoid a missing DSO error. * userspace/libscap/CMakeLists.txt: Do not hardcode STATIC type for scap_event_schema and scap_platform libraries, so as to install them (they are referenced in the pkg-config files). Fixes: #1820 Signed-off-by: Maxim Cournoyer --- driver/CMakeLists.txt | 5 +++++ userspace/libscap/CMakeLists.txt | 2 +- userspace/libscap/linux/CMakeLists.txt | 2 +- userspace/libsinsp/test/CMakeLists.txt | 8 +++++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/driver/CMakeLists.txt b/driver/CMakeLists.txt index 94f37ee2ac..fc844da7b8 100644 --- a/driver/CMakeLists.txt +++ b/driver/CMakeLists.txt @@ -158,6 +158,11 @@ set(DRIVER_SOURCES ppm_consumer.h capture_macro.h socketcall_to_syscall.h + syscall_compat_loongarch64.h + syscall_compat_ppc64le.h + syscall_compat_riscv64.h + syscall_compat_s390x.h + syscall_compat_x86_64.h syscall_ia32_64_map.c ) diff --git a/userspace/libscap/CMakeLists.txt b/userspace/libscap/CMakeLists.txt index e1974800e2..88c0ccff06 100644 --- a/userspace/libscap/CMakeLists.txt +++ b/userspace/libscap/CMakeLists.txt @@ -93,7 +93,7 @@ set(SCAP_PKGCONFIG_REQUIRES "") set(SCAP_PKGCONFIG_REQUIRES_PRIVATE zlib) add_library( - scap_event_schema STATIC + scap_event_schema scap_event.c ppm_sc_names.c scap_print_event.c diff --git a/userspace/libscap/linux/CMakeLists.txt b/userspace/libscap/linux/CMakeLists.txt index 435c8546c0..3f47b78010 100644 --- a/userspace/libscap/linux/CMakeLists.txt +++ b/userspace/libscap/linux/CMakeLists.txt @@ -13,7 +13,7 @@ # the License. # add_library( - scap_platform STATIC + scap_platform scap_linux_platform.c scap_linux_hostinfo_platform.c scap_procs.c diff --git a/userspace/libsinsp/test/CMakeLists.txt b/userspace/libsinsp/test/CMakeLists.txt index fb8c467547..be6420672b 100644 --- a/userspace/libsinsp/test/CMakeLists.txt +++ b/userspace/libsinsp/test/CMakeLists.txt @@ -191,7 +191,13 @@ target_include_directories( ) target_link_libraries( - unit-test-libsinsp sinsp "${GTEST_LIB}" "${GTEST_MAIN_LIB}" "${TBB_LIB}" "${JSONCPP_LIB}" + unit-test-libsinsp + sinsp + "${GRPCPP_LIB}" + "${GTEST_LIB}" + "${GTEST_MAIN_LIB}" + "${TBB_LIB}" + "${JSONCPP_LIB}" ) # Add some additional include directories associated with `ADDITIONAL_SINSP_TESTS_SUITE`