summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch43
-rw-r--r--meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb1
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch
new file mode 100644
index 0000000000..dac61773e5
--- /dev/null
+++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch
@@ -0,0 +1,43 @@
1From 7509f5d4bfcd8ba8bc0ad8c2054b2b336d8c0c9f Mon Sep 17 00:00:00 2001
2From: Minjae Kim <mj.kim@mercedes-benz.com>
3Date: Mon, 9 Feb 2026 20:34:53 +0000
4Subject: [PATCH] Findzstd.cmake: support pkg-config based zstd detection
5
6In Yocto builds, zstd is built via Makefile and does not install
7CMake package configuration files. As a result, Findzstd.cmake
8fails to detect ZSTD_INCLUDE_DIRS.
9
10Add pkg-config based detection as a fallback to properly locate
11zstd headers and libraries.
12
13fix error:
14| Could NOT find zstd (missing: ZSTD_INCLUDE_DIRS)
15| Call Stack (most recent call first):
16
17
18Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/14308]
19
20Signed-off-by: Minjae Kim <flowergom@gmail.com>
21
22---
23 cmake/modules/Findzstd.cmake | 4 ++++
24 1 file changed, 4 insertions(+)
25
26diff --git a/cmake/modules/Findzstd.cmake b/cmake/modules/Findzstd.cmake
27index e82fa148c8..f160be9ae0 100644
28--- a/cmake/modules/Findzstd.cmake
29+++ b/cmake/modules/Findzstd.cmake
30@@ -14,6 +14,10 @@ find_library(ZSTD_LIBRARIES
31 HINTS ${zstd_ROOT_DIR}/lib)
32
33 include(FindPackageHandleStandardArgs)
34+find_package(PkgConfig QUIET)
35+if(PKG_CONFIG_FOUND)
36+ pkg_check_modules(ZSTD QUIET libzstd)
37+endif()
38 find_package_handle_standard_args(zstd DEFAULT_MSG ZSTD_LIBRARIES ZSTD_INCLUDE_DIRS)
39
40 mark_as_advanced(
41--
422.43.0
43
diff --git a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb
index c6d5a0ec7f..d8ba31e8ca 100644
--- a/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb
+++ b/meta-oe/recipes-dbs/rocksdb/rocksdb_9.10.0.bb
@@ -22,6 +22,7 @@ SRC_URI = "git://github.com/facebook/${BPN}.git;branch=${SRCBRANCH};protocol=htt
22 file://run-ptest \ 22 file://run-ptest \
23 file://0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch \ 23 file://0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch \
24 file://0001-checkpoint.h-Add-missing-includes-cstdint.patch \ 24 file://0001-checkpoint.h-Add-missing-includes-cstdint.patch \
25 file://0001-Findzstd.cmake-support-pkg-config-based-zstd-detecti.patch \
25 " 26 "
26 27
27SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch" 28SRC_URI:append:riscv32 = " file://0001-replace-old-sync-with-new-atomic-builtin-equivalents.patch"