diff options
author | Khem Raj <raj.khem@gmail.com> | 2022-04-05 12:41:22 +0200 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2022-04-29 18:43:20 -0700 |
commit | 44ba6b5727b0907f0f1f4473eaf0e0828a7cabf6 (patch) | |
tree | 8027cdeb3fde70e33a4a2b267fc35bfbefd857e3 | |
parent | a970ee45c2335c37041ad1658323481874bb4f0e (diff) | |
download | meta-openembedded-44ba6b5727b0907f0f1f4473eaf0e0828a7cabf6.tar.gz |
abseil-cpp: Fix build with glibc 2.34
* based on commit from honister, but without the upgrade:
commit 8691de2580dd872e3d001d67c8455108b3bd627c
Author: Khem Raj <raj.khem@gmail.com>
Date: Sat May 8 14:38:52 2021 -0700
abseil-cpp: Upgrade to lts_2021_03_24
Fix build with glibc 2.34 while here
Forward patches to this version
Let system package the libraries
to fix abseil-cpp-native build on e.g. Ubuntu-22.04 with glibc-2.34 to fix:
| FAILED: absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o
| /OE/lge/build/webosose/hardknott/BUILD/hosttools/g++ -Dfailure_signal_handler_EXPORTS -I/OE/lge/build/webosose/hardknott/BUILD/work/x86_64-linux/abseil-cpp-native/20200923+gitAUTOINC+6f9d96a1f4-r0/git -isystem/OE/lge/build/webosose/hardknott/BUILD/work/x86_64-linux/abseil-cpp-native/20200923+gitAUTOINC+6f9d96a1f4-r0/recipe-sysroot-native/usr/include -O2 -pipe -fPIC -Wall -Wextra -Wcast-qual -Wconversion-null -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wundef -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -Wno-missing-field-initializers -Wno-sign-compare -DNOMINMAX -std=gnu++14 -MD -MT absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o -MF absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o.d -o absl/debugging/CMakeFiles/failure_signal_handler.dir/failure_signal_handler.cc.o -c /OE/lge/build/webosose/hardknott/BUILD/work/x86_64-linux/abseil-cpp-native/20200923+gitAUTOINC+6f9d96a1f4-r0/git/absl/debugging/failure_signal_handler.cc
| /OE/lge/build/webosose/hardknott/BUILD/work/x86_64-linux/abseil-cpp-native/20200923+gitAUTOINC+6f9d96a1f4-r0/git/absl/debugging/failure_signal_handler.cc: In function ‘bool absl::lts_2020_09_23::SetupAlternateStackOnce()’:
| /OE/lge/build/webosose/hardknott/BUILD/work/x86_64-linux/abseil-cpp-native/20200923+gitAUTOINC+6f9d96a1f4-r0/git/absl/debugging/failure_signal_handler.cc:138:32: error: no matching function for call to ‘max(long int, int)’
| 138 | size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
| | ~~~~~~~~^~~~~~~~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch | 82 | ||||
-rw-r--r-- | meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | 1 |
2 files changed, 83 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch new file mode 100644 index 0000000000..c0fb0571f7 --- /dev/null +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp/0001-Export-of-internal-Abseil-changes.patch | |||
@@ -0,0 +1,82 @@ | |||
1 | From d3424201a73f29ab533121b1821a76e1b4313beb Mon Sep 17 00:00:00 2001 | ||
2 | From: Abseil Team <absl-team@google.com> | ||
3 | Date: Mon, 3 May 2021 07:37:39 -0700 | ||
4 | Subject: [PATCH] Export of internal Abseil changes | ||
5 | |||
6 | -- | ||
7 | cf88f9cf40eab54c06bca7f20795352ec23bb583 by Derek Mauro <dmauro@google.com>: | ||
8 | |||
9 | Fixes build with latest glibc | ||
10 | Fixes #952 | ||
11 | |||
12 | PiperOrigin-RevId: 371693908 | ||
13 | |||
14 | -- | ||
15 | 99bcd0f4a747ce7a401e23c745adf34d0ec5131b by Samuel Benzaquen <sbenza@google.com>: | ||
16 | |||
17 | Add support for std::string_view in StrFormat even when | ||
18 | absl::string_view != std::string_view. | ||
19 | |||
20 | PiperOrigin-RevId: 371693633 | ||
21 | |||
22 | -- | ||
23 | e35463572149a6c2d4a0d439b9300ce03fd6b96d by Abseil Team <absl-team@google.com>: | ||
24 | |||
25 | Cmake builds should only install pkg-config when explicitly requested. | ||
26 | |||
27 | PiperOrigin-RevId: 371403419 | ||
28 | GitOrigin-RevId: cf88f9cf40eab54c06bca7f20795352ec23bb583 | ||
29 | Change-Id: I4360a18c638a4d901ff44ab1e0a9d8f321c302ea | ||
30 | --- | ||
31 | absl/debugging/failure_signal_handler.cc | 3 ++- | ||
32 | absl/strings/internal/str_format/arg.h | 8 ++++++++ | ||
33 | absl/strings/internal/str_format/convert_test.cc | 3 +++ | ||
34 | 3 files changed, 13 insertions(+), 1 deletion(-) | ||
35 | |||
36 | diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc | ||
37 | index 5d13bdbb..2ed137b5 100644 | ||
38 | --- a/absl/debugging/failure_signal_handler.cc | ||
39 | +++ b/absl/debugging/failure_signal_handler.cc | ||
40 | @@ -135,7 +135,8 @@ static bool SetupAlternateStackOnce() { | ||
41 | #else | ||
42 | const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; | ||
43 | #endif | ||
44 | - size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; | ||
45 | + size_t stack_size = | ||
46 | + (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask; | ||
47 | #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ | ||
48 | defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) | ||
49 | // Account for sanitizer instrumentation requiring additional stack space. | ||
50 | diff --git a/absl/strings/internal/str_format/arg.h b/absl/strings/internal/str_format/arg.h | ||
51 | index 3dbc1526..f9d89d12 100644 | ||
52 | --- a/absl/strings/internal/str_format/arg.h | ||
53 | +++ b/absl/strings/internal/str_format/arg.h | ||
54 | @@ -108,6 +108,14 @@ StringConvertResult FormatConvertImpl(const std::string& v, | ||
55 | StringConvertResult FormatConvertImpl(string_view v, | ||
56 | FormatConversionSpecImpl conv, | ||
57 | FormatSinkImpl* sink); | ||
58 | +#if defined(ABSL_HAVE_STD_STRING_VIEW) && !defined(ABSL_USES_STD_STRING_VIEW) | ||
59 | +inline StringConvertResult FormatConvertImpl(std::string_view v, | ||
60 | + FormatConversionSpecImpl conv, | ||
61 | + FormatSinkImpl* sink) { | ||
62 | + return FormatConvertImpl(absl::string_view(v.data(), v.size()), conv, sink); | ||
63 | +} | ||
64 | +#endif // ABSL_HAVE_STD_STRING_VIEW && !ABSL_USES_STD_STRING_VIEW | ||
65 | + | ||
66 | ArgConvertResult<FormatConversionCharSetUnion( | ||
67 | FormatConversionCharSetInternal::s, FormatConversionCharSetInternal::p)> | ||
68 | FormatConvertImpl(const char* v, const FormatConversionSpecImpl conv, | ||
69 | diff --git a/absl/strings/internal/str_format/convert_test.cc b/absl/strings/internal/str_format/convert_test.cc | ||
70 | index 634ee78b..cc789530 100644 | ||
71 | --- a/absl/strings/internal/str_format/convert_test.cc | ||
72 | +++ b/absl/strings/internal/str_format/convert_test.cc | ||
73 | @@ -215,6 +215,9 @@ TEST_F(FormatConvertTest, BasicString) { | ||
74 | TestStringConvert(static_cast<const char*>("hello")); | ||
75 | TestStringConvert(std::string("hello")); | ||
76 | TestStringConvert(string_view("hello")); | ||
77 | +#if defined(ABSL_HAVE_STD_STRING_VIEW) | ||
78 | + TestStringConvert(std::string_view("hello")); | ||
79 | +#endif // ABSL_HAVE_STD_STRING_VIEW | ||
80 | } | ||
81 | |||
82 | TEST_F(FormatConvertTest, NullString) { | ||
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb index 569bb13993..a49fe672e8 100644 --- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb +++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \ | |||
14 | file://0001-absl-always-use-asm-sgidefs.h.patch \ | 14 | file://0001-absl-always-use-asm-sgidefs.h.patch \ |
15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ | 15 | file://0002-Remove-maes-option-from-cross-compilation.patch \ |
16 | file://abseil-ppc-fixes.patch \ | 16 | file://abseil-ppc-fixes.patch \ |
17 | file://0001-Export-of-internal-Abseil-changes.patch \ | ||
17 | " | 18 | " |
18 | 19 | ||
19 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |