Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repaired building iroha according to instruction: Added patch file to make sure abseil library is building without changes #2902

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions vcpkg/patches/0007-repaired-ambiguous-template-usage.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
commit 53763b4e3ff1174e823b8adf6326746e3ea940b5
Author: Grzegorz Bazior <[email protected]>
Date: Mon Oct 24 01:53:56 2022 +0200

Added patch file to repair building of abseil library: std::max ambiguous call

Signed-off-by: Grzegorz Bazior <[email protected]>


diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake
index 94a7673c0..5f8384c32 100644
--- a/ports/abseil/portfile.cmake
+++ b/ports/abseil/portfile.cmake
@@ -15,6 +15,7 @@ vcpkg_from_github(
# detection can cause ABI issues depending on which compiler options
# are enabled for consuming user code
fix-cxx-standard.patch
+ repaired-ambiguous-template-usage.patch
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS


diff --git a/abseil/repaired-ambiguous-template-usage.patch b/abseil/repaired-ambiguous-template-usage.patch
new file mode 100644
index 000000000..35221a4c9
--- /dev/null
+++ b/ports/abseil/repaired-ambiguous-template-usage.patch
@@ -0,0 +1,13 @@
+diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc
+index a9ed6ef..a32e7c5 100644
+--- a/absl/debugging/failure_signal_handler.cc
++++ b/absl/debugging/failure_signal_handler.cc
+@@ -136,7 +136,7 @@ static bool SetupAlternateStackOnce() {
+ #else
+ const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
+ #endif
+- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
++ size_t stack_size = (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
+ #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \
+ defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER)
+ // Account for sanitizer instrumentation requiring additional stack space.