summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNguyen Dat Tho <tho3.nguyen@lge.com>2025-04-03 17:23:06 +0900
committerKhem Raj <raj.khem@gmail.com>2025-04-04 19:18:46 -0700
commita84285468133e3df1de401c72103a85e7f3efad5 (patch)
tree7b9c945879040ace3c91543944f93a3deb682ad0
parenteaf94b092d82ce5ed5ab6e4d3e2bf28686f39808 (diff)
downloadmeta-openembedded-a84285468133e3df1de401c72103a85e7f3efad5.tar.gz
thrift: Fix build with gcc-15
Backport patch to fix issue: https://errors.yoctoproject.org/Errors/Details/850167/ TOPDIR/tmp/work/core2-64-oe-linux/thrift/0.21.0/thrift-0.21.0/lib/cpp/src/thrift/concurrency/Mutex.h:47:26: error: 'int64_t' has not been declared 47 | virtual bool timedlock(int64_t milliseconds) const; | ^~~~~~~ TOPDIR/tmp/work/core2-64-oe-linux/thrift/0.21.0/thrift-0.21.0/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>' 24 | #include <thrift/TNonCopyable.h> +++ |+#include <cstdint> Signed-off-by: Nguyen Dat Tho <tho3.nguyen@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-connectivity/thrift/thrift/0002-THRIFT-5842-Add-missing-cstdint-include-for-int64_t.patch52
-rw-r--r--meta-oe/recipes-connectivity/thrift/thrift_0.21.0.bb4
2 files changed, 55 insertions, 1 deletions
diff --git a/meta-oe/recipes-connectivity/thrift/thrift/0002-THRIFT-5842-Add-missing-cstdint-include-for-int64_t.patch b/meta-oe/recipes-connectivity/thrift/thrift/0002-THRIFT-5842-Add-missing-cstdint-include-for-int64_t.patch
new file mode 100644
index 0000000000..e0bce16537
--- /dev/null
+++ b/meta-oe/recipes-connectivity/thrift/thrift/0002-THRIFT-5842-Add-missing-cstdint-include-for-int64_t.patch
@@ -0,0 +1,52 @@
1From 947ad66940cfbadd9b24ba31d892dfc1142dd330 Mon Sep 17 00:00:00 2001
2From: Sutou Kouhei <kou@clear-code.com>
3Date: Mon, 23 Dec 2024 12:33:22 +0900
4Subject: [PATCH] THRIFT-5842: Add missing cstdint include for int64_t in
5 Mutex.h
6
7Client: cpp
8
9GCC 15 (not released yet) requires `#include <cstdint>` for `int64_t`
10but `lib/cpp/src/thrift/concurrency/Mutex.h` doesn't have it. So we
11can'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
31See also: https://github.com/apache/arrow/issues/45096
32
33Upstream-Status: Backport [https://github.com/apache/thrift/commit/947ad66940cfbadd9b24ba31d892dfc1142dd330]
34---
35 lib/cpp/src/thrift/concurrency/Mutex.h | 1 +
36 1 file changed, 1 insertion(+)
37
38diff --git a/lib/cpp/src/thrift/concurrency/Mutex.h b/lib/cpp/src/thrift/concurrency/Mutex.h
39index 1e5c3fba3..12f1729d6 100644
40--- a/lib/cpp/src/thrift/concurrency/Mutex.h
41+++ b/lib/cpp/src/thrift/concurrency/Mutex.h
42@@ -20,6 +20,7 @@
43 #ifndef _THRIFT_CONCURRENCY_MUTEX_H_
44 #define _THRIFT_CONCURRENCY_MUTEX_H_ 1
45
46+#include <cstdint>
47 #include <memory>
48 #include <thrift/TNonCopyable.h>
49
50--
512.34.1
52
diff --git a/meta-oe/recipes-connectivity/thrift/thrift_0.21.0.bb b/meta-oe/recipes-connectivity/thrift/thrift_0.21.0.bb
index 35e55b2255..85e2e68694 100644
--- a/meta-oe/recipes-connectivity/thrift/thrift_0.21.0.bb
+++ b/meta-oe/recipes-connectivity/thrift/thrift_0.21.0.bb
@@ -9,7 +9,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c40a383cb3f747e0c7abbf1482f194f0 \
9DEPENDS = "thrift-native boost flex-native bison-native openssl zlib" 9DEPENDS = "thrift-native boost flex-native bison-native openssl zlib"
10 10
11SRC_URI = "https://downloads.apache.org/${BPN}/${PV}/${BP}.tar.gz \ 11SRC_URI = "https://downloads.apache.org/${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://0002-THRIFT-5842-Add-missing-cstdint-include-for-int64_t.patch \
14 "
13SRC_URI[sha256sum] = "9a24f3eba9a4ca493602226c16d8c228037db3b9291c6fc4019bfe3bd39fc67c" 15SRC_URI[sha256sum] = "9a24f3eba9a4ca493602226c16d8c228037db3b9291c6fc4019bfe3bd39fc67c"
14 16
15BBCLASSEXTEND = "native nativesdk" 17BBCLASSEXTEND = "native nativesdk"