diff mbox series

[meta-oe] sysdig: Allow to build with CMake 4+

Message ID 20250714120941.179160-1-Moritz.Haase@bmw.de
State Under Review
Headers show
Series [meta-oe] sysdig: Allow to build with CMake 4+ | expand

Commit Message

Haase Moritz, JD-62 July 14, 2025, 12:09 p.m. UTC
The latest release seems to have support to build with CMake 4+, but updating
requires major changes to the recipe and so far I haven't managed to get a build
passing. Thus, apply the 'minimum policy version' override instead and backport
one patch to unblock builds with CMake 4.

Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
---
 ...Only-add-dependencies-when-we-bundle.patch | 35 +++++++++++++++++++
 .../recipes-extended/sysdig/sysdig_0.28.0.bb  |  4 ++-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/sysdig/sysdig/0001-update-cmake-Only-add-dependencies-when-we-bundle.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/sysdig/sysdig/0001-update-cmake-Only-add-dependencies-when-we-bundle.patch b/meta-oe/recipes-extended/sysdig/sysdig/0001-update-cmake-Only-add-dependencies-when-we-bundle.patch
new file mode 100644
index 0000000000..93593b6269
--- /dev/null
+++ b/meta-oe/recipes-extended/sysdig/sysdig/0001-update-cmake-Only-add-dependencies-when-we-bundle.patch
@@ -0,0 +1,35 @@ 
+From ed35037e3ba575d9b0d1ef4cd5b6ab9111136922 Mon Sep 17 00:00:00 2001
+From: Moritz Haase <Moritz.Haase@bmw.de>
+Date: Mon, 14 Jul 2025 13:57:30 +0200
+Subject: [PATCH] update(cmake): Only add dependencies when we bundle
+
+Only add dependencies for valijson when we're using the bundled version.
+
+Fixes
+
+| CMake Error at falcosecurity-libs/userspace/libsinsp/CMakeLists.txt:184 (add_dependencies):
+|   The dependency target "valijson" of target "sinsp" does not exist.
+
+when building with CMake 4.
+
+Upstream-Status: Backport [7d850bad002b56ca5e85fffb1f69b4b1cfeddd91]
+Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
+---
+ userspace/libsinsp/CMakeLists.txt | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/userspace/libsinsp/CMakeLists.txt b/userspace/libsinsp/CMakeLists.txt
+index 9794a697c..a82f8c0c1 100644
+--- a/userspace/libsinsp/CMakeLists.txt
++++ b/userspace/libsinsp/CMakeLists.txt
+@@ -181,7 +181,9 @@ set(SINSP_LIBRARIES
+ 	"${JSONCPP_LIB}"
+ 	"${CARES_LIB}")
+ 
+-add_dependencies(sinsp valijson)
++if(USE_BUNDLED_VALIJSON)
++	add_dependencies(sinsp valijson)
++endif()
+ 
+ if(WITH_CHISEL AND USE_BUNDLED_LUAJIT)
+ 	add_dependencies(sinsp luajit)
diff --git a/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb b/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
index b60f9c643c..c988b0af59 100644
--- a/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
+++ b/meta-oe/recipes-extended/sysdig/sysdig_0.28.0.bb
@@ -24,9 +24,10 @@  RDEPENDS:${PN} = "bash"
 
 SRC_URI = "git://github.com/draios/sysdig.git;branch=dev;protocol=https;name=sysdig \
            git://github.com/falcosecurity/libs;protocol=https;branch=master;name=falco;subdir=${BB_GIT_DEFAULT_DESTSUFFIX}/falcosecurity-libs \
-           file://0001-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
            file://0001-cmake-Pass-PROBE_NAME-via-CFLAGS.patch \
+           file://0001-Add-cstdint-for-uintXX_t-types.patch;patchdir=./falcosecurity-libs \
            file://0001-libsinsp-fix-build-with-gcc-15.patch;patchdir=./falcosecurity-libs \
+           file://0001-update-cmake-Only-add-dependencies-when-we-bundle.patch;patchdir=./falcosecurity-libs \
           "
 SRCREV_sysdig = "4fb6288275f567f63515df0ff0a6518043ecfa9b"
 SRCREV_falco = "caa0e4d0044fdaaebab086592a97f0c7f32aeaa9"
@@ -35,6 +36,7 @@  SRCREV_FORMAT = "sysdig_falco"
 
 
 EXTRA_OECMAKE = "\
+                -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
                 -DBUILD_DRIVER=OFF \
                 -DMINIMAL_BUILD=ON \
                 -DUSE_BUNDLED_DEPS=OFF \