diff options
Diffstat (limited to 'meta-oe/recipes-dbs/rocksdb/files')
5 files changed, 231 insertions, 0 deletions
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch new file mode 100644 index 0000000000..b0a949fe31 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-CMakeLists.txt-Make-the-test-discovery-occur-on-targ.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 9abf6cd09c60f0be9a85c055dfdf43698f057f73 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Wed, 25 Sep 2024 13:47:37 +0800 | ||
4 | Subject: [PATCH] CMakeLists.txt: Make the test discovery occur on target | ||
5 | |||
6 | Set DISCOVERY_MODE to PRE_TEST to delay test discovery until just | ||
7 | prior to test execution on the target to fix the build failure as | ||
8 | the default POST_BUILD behavior is not desirable in cross-compiling | ||
9 | env. | ||
10 | |||
11 | /build/tmp/work/core2-64-wrs-linux/rocksdb/9.0.0/build/env_basic_test: error while loading shared libraries: libgflags.so.2.2: cannot open shared object file: No such file or directory | ||
12 | CMake Error at /build/tmp/work/core2-64-wrs-linux/rocksdb/9.0.0/recipe-sysroot-native/usr/share/cmake-3.30/Modules/GoogleTestAddTests.cmake:112 (message): | ||
13 | Error running test executable. | ||
14 | |||
15 | Path: '/build/tmp/work/core2-64-wrs-linux/rocksdb/9.0.0/build/env_basic_test' | ||
16 | Working directory: '/build/tmp/work/core2-64-wrs-linux/rocksdb/9.0.0/build' | ||
17 | Result: 127 | ||
18 | Output: | ||
19 | |||
20 | Upstream-Status: Inappropriate [oe specific] | ||
21 | |||
22 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
23 | --- | ||
24 | CMakeLists.txt | 2 +- | ||
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
28 | index 403ad1243..f34397798 100644 | ||
29 | --- a/CMakeLists.txt | ||
30 | +++ b/CMakeLists.txt | ||
31 | @@ -1502,7 +1502,7 @@ if(WITH_TESTS) | ||
32 | ) | ||
33 | target_link_libraries(${exename}${ARTIFACT_SUFFIX} testutillib${ARTIFACT_SUFFIX} testharness gtest ${THIRDPARTY_LIBS} ${ROCKSDB_LIB}) | ||
34 | if(NOT "${exename}" MATCHES "db_sanity_test") | ||
35 | - gtest_discover_tests(${exename} DISCOVERY_TIMEOUT 120) | ||
36 | + gtest_discover_tests(${exename} DISCOVERY_TIMEOUT 120 DISCOVERY_MODE PRE_TEST) | ||
37 | add_dependencies(rocksdb_check ${exename}${ARTIFACT_SUFFIX}) | ||
38 | endif() | ||
39 | endforeach(sourcefile ${TESTS}) | ||
40 | -- | ||
41 | 2.34.1 | ||
42 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch new file mode 100644 index 0000000000..168bd76ac7 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-Fix-build-error-with-gcc-13-by-adding-cstdint-header.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 90eba5458cb4ac2f83cac8aa550927876e6a9a09 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= <lnicola@dend.ro> | ||
3 | Date: Wed, 5 Mar 2025 15:42:46 +0200 | ||
4 | Subject: [PATCH] Add missing include (#13365) | ||
5 | |||
6 | * see more details: http://errors.yoctoproject.org/Errors/Details/851177/ | ||
7 | In file included from TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.cc:6: | ||
8 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:28:7: error: 'uint64_t' has not been declared | ||
9 | 28 | uint64_t blob_file_number, uint64_t total_blob_count, | ||
10 | | ^~~~~~~~ | ||
11 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:15:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
12 | 14 | #include "rocksdb/rocksdb_namespace.h" | ||
13 | +++ |+#include <cstdint> | ||
14 | 15 | | ||
15 | TOPDIR/tmp/work/core2-64-oe-linux/rocksdb/9.10.0/git/db/blob/blob_file_meta.h:28:34: error: 'uint64_t' has not been declared | ||
16 | 28 | uint64_t blob_file_number, uint64_t total_blob_count, | ||
17 | | ^~~~~~~~ | ||
18 | ... | ||
19 | |||
20 | * See also: https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes | ||
21 | |||
22 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/13437] | ||
23 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
24 | --- | ||
25 | db/blob/blob_file_meta.h | 1 + | ||
26 | include/rocksdb/trace_record.h | 1 + | ||
27 | include/rocksdb/write_batch_base.h | 1 + | ||
28 | 3 files changed, 3 insertions(+) | ||
29 | |||
30 | diff --git a/db/blob/blob_file_meta.h b/db/blob/blob_file_meta.h | ||
31 | index d7c8a1243..2e47726f8 100644 | ||
32 | --- a/db/blob/blob_file_meta.h | ||
33 | +++ b/db/blob/blob_file_meta.h | ||
34 | @@ -6,6 +6,7 @@ | ||
35 | #pragma once | ||
36 | |||
37 | #include <cassert> | ||
38 | +#include <cstdint> | ||
39 | #include <iosfwd> | ||
40 | #include <memory> | ||
41 | #include <string> | ||
42 | diff --git a/include/rocksdb/trace_record.h b/include/rocksdb/trace_record.h | ||
43 | index 8f9c3ee2f..d321f5387 100644 | ||
44 | --- a/include/rocksdb/trace_record.h | ||
45 | +++ b/include/rocksdb/trace_record.h | ||
46 | @@ -5,6 +5,7 @@ | ||
47 | |||
48 | #pragma once | ||
49 | |||
50 | +#include <cstdint> | ||
51 | #include <memory> | ||
52 | #include <string> | ||
53 | #include <vector> | ||
54 | diff --git a/include/rocksdb/write_batch_base.h b/include/rocksdb/write_batch_base.h | ||
55 | index 3334a1292..43b186029 100644 | ||
56 | --- a/include/rocksdb/write_batch_base.h | ||
57 | +++ b/include/rocksdb/write_batch_base.h | ||
58 | @@ -9,6 +9,7 @@ | ||
59 | #pragma once | ||
60 | |||
61 | #include <cstddef> | ||
62 | +#include <cstdint> | ||
63 | |||
64 | #include "rocksdb/attribute_groups.h" | ||
65 | #include "rocksdb/rocksdb_namespace.h" | ||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch b/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch new file mode 100644 index 0000000000..a872be5b54 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/0001-checkpoint.h-Add-missing-includes-cstdint.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 31012cdfa435d9203da3c3de8127b66bf018692a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 24 Jan 2023 21:40:43 -0800 | ||
4 | Subject: [PATCH] checkpoint.h: Add missing includes <cstdint> | ||
5 | |||
6 | It uses uint64_t and it comes from <cstdint> | ||
7 | This is needed with GCC 13 and newer [1] | ||
8 | |||
9 | [1] https://www.gnu.org/software/gcc/gcc-13/porting_to.html | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | * build error: | ||
14 | FAILED: CMakeFiles/checkpoint_test.dir/utilities/checkpoint/checkpoint_test.cc.o | ||
15 | In file included from rocksdb/9.10.0/git/utilities/checkpoint/checkpoint_test.cc:11: | ||
16 | rocksdb/9.10.0/git/include/rocksdb/utilities/checkpoint.h:49:35: error: 'uint64_t' has not been declared | ||
17 | 49 | uint64_t log_size_for_flush = 0, | ||
18 | | ^~~~~~~~ | ||
19 | rocksdb/9.10.0/git/include/rocksdb/utilities/checkpoint.h:14:1: note: 'uint64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
20 | 13 | #include "rocksdb/status.h" | ||
21 | +++ |+#include <cstdint> | ||
22 | 14 | | ||
23 | |||
24 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/11137] | ||
25 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
26 | --- | ||
27 | include/rocksdb/utilities/checkpoint.h | 1 + | ||
28 | 1 file changed, 1 insertion(+) | ||
29 | |||
30 | Index: git/include/rocksdb/utilities/checkpoint.h | ||
31 | =================================================================== | ||
32 | --- git.orig/include/rocksdb/utilities/checkpoint.h | ||
33 | +++ git/include/rocksdb/utilities/checkpoint.h | ||
34 | @@ -7,6 +7,7 @@ | ||
35 | |||
36 | #pragma once | ||
37 | |||
38 | +#include <cstdint> | ||
39 | #include <string> | ||
40 | #include <vector> | ||
41 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/run-ptest b/meta-oe/recipes-dbs/rocksdb/files/run-ptest new file mode 100644 index 0000000000..45406fdfa1 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/run-ptest | |||
@@ -0,0 +1,12 @@ | |||
1 | #!/bin/sh | ||
2 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
3 | cd "$ptestdir"/tests || exit | ||
4 | |||
5 | for test in *_test; do | ||
6 | if ./${test} >/dev/null 2>&1; then | ||
7 | echo "PASS: ${test}" | ||
8 | else | ||
9 | echo "FAIL: ${test}" | ||
10 | fi | ||
11 | done | ||
12 | |||
diff --git a/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch b/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch new file mode 100644 index 0000000000..9a85e8db45 --- /dev/null +++ b/meta-oe/recipes-dbs/rocksdb/files/static_library_as_option.patch | |||
@@ -0,0 +1,71 @@ | |||
1 | From 285d306494bde3e9c24c8cd6fea1eb380a304d03 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bindu-Bhabu <bindudaniel1996@gmail.com> | ||
3 | Date: Fri, 26 Jul 2024 15:14:45 +0530 | ||
4 | Subject: Add option to CMake for building static libraries | ||
5 | |||
6 | ROCKSDB creates a STATIC library target reference by default. | ||
7 | Modify the cmake so that the STATIC library is also an option | ||
8 | just like creating a SHARED library and set default to ON. | ||
9 | |||
10 | Upstream-Status: Submitted [https://github.com/facebook/rocksdb/pull/12890] | ||
11 | |||
12 | Signed-off-by: Nisha Parrakat <nisha.m.parrakat@bmw.de> | ||
13 | Signed-off-by: Bindu Bhabu <bhabu.bindu@kpit.com> | ||
14 | --- | ||
15 | CMakeLists.txt | 29 +++++++++++++++++------------ | ||
16 | 1 file changed, 17 insertions(+), 12 deletions(-) | ||
17 | |||
18 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
19 | index 93b884dd9c1..2ca925d505c 100644 | ||
20 | --- a/CMakeLists.txt | ||
21 | +++ b/CMakeLists.txt | ||
22 | @@ -98,6 +98,7 @@ if (WITH_WINDOWS_UTF8_FILENAMES) | ||
23 | add_definitions(-DROCKSDB_WINDOWS_UTF8_FILENAMES) | ||
24 | endif() | ||
25 | option(ROCKSDB_BUILD_SHARED "Build shared versions of the RocksDB libraries" ON) | ||
26 | +option(ROCKSDB_BUILD_STATIC "Build static versions of the RocksDB libraries" ON) | ||
27 | |||
28 | if( NOT DEFINED CMAKE_CXX_STANDARD ) | ||
29 | set(CMAKE_CXX_STANDARD 17) | ||
30 | @@ -1139,11 +1140,13 @@ string(REGEX REPLACE "[^0-9: /-]+" "" GIT_DATE "${GIT_DATE}") | ||
31 | set(BUILD_VERSION_CC ${CMAKE_BINARY_DIR}/build_version.cc) | ||
32 | configure_file(util/build_version.cc.in ${BUILD_VERSION_CC} @ONLY) | ||
33 | |||
34 | -add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) | ||
35 | -target_include_directories(${ROCKSDB_STATIC_LIB} PUBLIC | ||
36 | - $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) | ||
37 | -target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE | ||
38 | - ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) | ||
39 | +if(ROCKSDB_BUILD_STATIC) | ||
40 | + add_library(${ROCKSDB_STATIC_LIB} STATIC ${SOURCES} ${BUILD_VERSION_CC}) | ||
41 | + target_include_directories(${ROCKSDB_STATIC_LIB} PUBLIC | ||
42 | + $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>) | ||
43 | + target_link_libraries(${ROCKSDB_STATIC_LIB} PRIVATE | ||
44 | + ${THIRDPARTY_LIBS} ${SYSTEM_LIBS}) | ||
45 | +endif() | ||
46 | |||
47 | if(ROCKSDB_BUILD_SHARED) | ||
48 | add_library(${ROCKSDB_SHARED_LIB} SHARED ${SOURCES} ${BUILD_VERSION_CC}) | ||
49 | @@ -1238,13 +1241,15 @@ if(NOT WIN32 OR ROCKSDB_INSTALL_ON_WINDOWS) | ||
50 | |||
51 | install(DIRECTORY "${PROJECT_SOURCE_DIR}/cmake/modules" COMPONENT devel DESTINATION ${package_config_destination}) | ||
52 | |||
53 | - install( | ||
54 | - TARGETS ${ROCKSDB_STATIC_LIB} | ||
55 | - EXPORT RocksDBTargets | ||
56 | - COMPONENT devel | ||
57 | - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
58 | - INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
59 | - ) | ||
60 | + if(ROCKSDB_BUILD_STATIC) | ||
61 | + install( | ||
62 | + TARGETS ${ROCKSDB_STATIC_LIB} | ||
63 | + EXPORT RocksDBTargets | ||
64 | + COMPONENT devel | ||
65 | + ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
66 | + INCLUDES DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" | ||
67 | + ) | ||
68 | + endif() | ||
69 | |||
70 | if(ROCKSDB_BUILD_SHARED) | ||
71 | install( | ||