diff options
| author | Adrian Freihofer <adrian.freihofer@siemens.com> | 2025-10-01 15:49:50 +0200 |
|---|---|---|
| committer | Anuj Mittal <anuj.mittal@intel.com> | 2025-10-06 16:08:31 +0800 |
| commit | 1dfa9a4db6dad531cd360705db6b0f52f0584420 (patch) | |
| tree | 33f4d436efa559644b87539b2f38c723cd025e04 | |
| parent | 92b5724cefd051d695a8e6de379bd9aa02600d66 (diff) | |
| download | meta-openembedded-1dfa9a4db6dad531cd360705db6b0f52f0584420.tar.gz | |
thrift: fix build with gcc 15
Cherry-pick a patch adding missing cstdint include for int64_t in
Mutex.h
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
| -rw-r--r-- | meta-oe/recipes-connectivity/thrift/thrift/0001-THRIFT-5842-Add-missing-cstdint-include-for-int64_t-.patch | 51 | ||||
| -rw-r--r-- | meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb | 3 |
2 files changed, 53 insertions, 1 deletions
diff --git a/meta-oe/recipes-connectivity/thrift/thrift/0001-THRIFT-5842-Add-missing-cstdint-include-for-int64_t-.patch b/meta-oe/recipes-connectivity/thrift/thrift/0001-THRIFT-5842-Add-missing-cstdint-include-for-int64_t-.patch new file mode 100644 index 0000000000..c5a56338a3 --- /dev/null +++ b/meta-oe/recipes-connectivity/thrift/thrift/0001-THRIFT-5842-Add-missing-cstdint-include-for-int64_t-.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From 949cf4dc8973b39138cf89ce817b714d3bcce6eb Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Sutou Kouhei <kou@clear-code.com> | ||
| 3 | Date: Mon, 23 Dec 2024 12:33:22 +0900 | ||
| 4 | Subject: [PATCH] THRIFT-5842: Add missing cstdint include for int64_t in | ||
| 5 | Mutex.h | ||
| 6 | |||
| 7 | Client: cpp | ||
| 8 | |||
| 9 | GCC 15 (not released yet) requires `#include <cstdint>` for `int64_t` | ||
| 10 | but `lib/cpp/src/thrift/concurrency/Mutex.h` doesn't have it. So we | ||
| 11 | can't build Thrift with GCC 15: | ||
| 12 | |||
| 13 | [80/359] Building CXX object lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o | ||
| 14 | FAILED: lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o | ||
| 15 | /bin/g++-15 -DBOOST_ALL_DYN_LINK -DBOOST_TEST_DYN_LINK -DTHRIFT_STATIC_DEFINE -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/kou/work/cpp/thrift.kou.build/lib/cpp -I/home/kou/work/cpp/thrift.kou/lib/cpp -I/home/kou/work/cpp/thrift.kou.build -I/home/kou/work/cpp/thrift.kou/lib/cpp/src -g -std=c++11 -MD -MT lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -MF lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o.d -o lib/cpp/CMakeFiles/thrift.dir/src/thrift/transport/TSSLServerSocket.cpp.o -c /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp | ||
| 16 | In file included from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TServerSocket.h:25, | ||
| 17 | from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.h:23, | ||
| 18 | from /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/transport/TSSLServerSocket.cpp:21: | ||
| 19 | /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:47:26: error: 'int64_t' has not been declared | ||
| 20 | 47 | virtual bool timedlock(int64_t milliseconds) const; | ||
| 21 | | ^~~~~~~ | ||
| 22 | /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:25:1: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
| 23 | 24 | #include <thrift/TNonCopyable.h> | ||
| 24 | +++ |+#include <cstdint> | ||
| 25 | 25 | | ||
| 26 | /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: error: 'int64_t' has not been declared | ||
| 27 | 60 | Guard(const Mutex& value, int64_t timeout = 0) : mutex_(&value) { | ||
| 28 | | ^~~~~~~ | ||
| 29 | /home/kou/work/cpp/thrift.kou/lib/cpp/src/thrift/concurrency/Mutex.h:60:29: note: 'int64_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>' | ||
| 30 | |||
| 31 | See also: https://github.com/apache/arrow/issues/45096 | ||
| 32 | |||
| 33 | Upstream-Status: Backport [https://github.com/apache/thrift/pull/3078] | ||
| 34 | |||
| 35 | Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> | ||
| 36 | --- | ||
| 37 | lib/cpp/src/thrift/concurrency/Mutex.h | 1 + | ||
| 38 | 1 file changed, 1 insertion(+) | ||
| 39 | |||
| 40 | diff --git a/lib/cpp/src/thrift/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h | ||
| 41 | index 1e5c3fba3..12f1729d6 100644 | ||
| 42 | --- a/lib/cpp/src/thrift/concurrency/Mutex.h | ||
| 43 | +++ b/lib/cpp/src/thrift/concurrency/Mutex.h | ||
| 44 | @@ -20,6 +20,7 @@ | ||
| 45 | #ifndef _THRIFT_CONCURRENCY_MUTEX_H_ | ||
| 46 | #define _THRIFT_CONCURRENCY_MUTEX_H_ 1 | ||
| 47 | |||
| 48 | +#include <cstdint> | ||
| 49 | #include <memory> | ||
| 50 | #include <thrift/TNonCopyable.h> | ||
| 51 | |||
diff --git a/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb b/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb index 14b98e6717..e4fd07198c 100644 --- a/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb +++ b/meta-oe/recipes-connectivity/thrift/thrift_0.20.0.bb | |||
| @@ -11,7 +11,8 @@ DEPENDS = "thrift-native boost flex-native bison-native openssl zlib" | |||
| 11 | SRC_URI = "https://archive.apache.org/dist/${BPN}/${PV}/${BP}.tar.gz \ | 11 | SRC_URI = "https://archive.apache.org/dist/${BPN}/${PV}/${BP}.tar.gz \ |
| 12 | file://0001-DefineInstallationPaths.cmake-Define-libdir-in-terms.patch \ | 12 | file://0001-DefineInstallationPaths.cmake-Define-libdir-in-terms.patch \ |
| 13 | file://0001-thrift-pr2755.patch \ | 13 | file://0001-thrift-pr2755.patch \ |
| 14 | " | 14 | file://0001-THRIFT-5842-Add-missing-cstdint-include-for-int64_t-.patch \ |
| 15 | " | ||
| 15 | SRC_URI[sha256sum] = "b5d8311a779470e1502c027f428a1db542f5c051c8e1280ccd2163fa935ff2d6" | 16 | SRC_URI[sha256sum] = "b5d8311a779470e1502c027f428a1db542f5c051c8e1280ccd2163fa935ff2d6" |
| 16 | 17 | ||
| 17 | BBCLASSEXTEND = "native nativesdk" | 18 | BBCLASSEXTEND = "native nativesdk" |
