From c2723daa27208d5be242bf441bec24f60c421945 Mon Sep 17 00:00:00 2001 From: Yan Avlasov Date: Fri, 19 Apr 2024 16:23:58 +0000 Subject: [PATCH] Fix build issues Signed-off-by: Yan Avlasov --- bazel/grpc.patch | 12 ++++++++++ bazel/protobuf.patch | 24 +++++++++---------- .../alts/alts_tsi_handshaker.cc | 4 +++- 3 files changed, 27 insertions(+), 13 deletions(-) diff --git a/bazel/grpc.patch b/bazel/grpc.patch index 57d197205e52..51aec838d482 100644 --- a/bazel/grpc.patch +++ b/bazel/grpc.patch @@ -24,3 +24,15 @@ index 1bb970e049..81265483e9 100644 ], ) +diff --git a/src/core/lib/promise/detail/promise_like.h b/src/core/lib/promise/detail/promise_like.h +--- a/src/core/lib/promise/detail/promise_like.h 2024-04-18 19:47:19.524155042 +0000 ++++ b/src/core/lib/promise/detail/promise_like.h 2024-04-18 23:40:29.050761807 +0000 +@@ -71,7 +71,7 @@ + + template + class PromiseLike::type>::value>> { ++ typename std::invoke_result::type>::value>> { + private: + GPR_NO_UNIQUE_ADDRESS F f_; + diff --git a/bazel/protobuf.patch b/bazel/protobuf.patch index 09d7337e9aa4..5387f45cd946 100644 --- a/bazel/protobuf.patch +++ b/bazel/protobuf.patch @@ -122,18 +122,6 @@ diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc // This error has been generally flaky, but we need to disable it specifically // to fix https://github.com/protocolbuffers/protobuf/issues/12313 #pragma clang diagnostic ignored "-Wunused-parameter" -diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h ---- a/src/google/protobuf/map_field.h 2023-06-30 17:14:18.934528580 +0000 -+++ b/src/google/protobuf/map_field.h 2023-06-30 17:14:52.098500807 +0000 -@@ -345,7 +345,7 @@ - - protected: - // "protected" stops users from deleting a `MapFieldBase *` -- ~MapFieldBase(); -+ virtual ~MapFieldBase(); - - struct VTable : MapFieldBaseForParse::VTable { - bool (*lookup_map_value)(const MapFieldBase& map, const MapKey& map_key, diff --git a/src/google/protobuf/compiler/BUILD.bazel b/src/google/protobuf/compiler/BUILD.bazel --- a/src/google/protobuf/compiler/BUILD.bazel +++ b/src/google/protobuf/compiler/BUILD.bazel @@ -161,3 +149,15 @@ index 1c6a24945..c27d0bf2a 100644 #if PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII #define PROTOBUF_DEBUG true #else +diff --git a/src/google/protobuf/message_lite.cc b/src/google/protobuf/message_lite.cc +--- a/src/google/protobuf/message_lite.cc 2024-04-19 15:49:01.333322873 +0000 ++++ b/src/google/protobuf/message_lite.cc 2024-04-19 15:50:41.065136525 +0000 +@@ -66,7 +66,7 @@ + + int MessageLite::GetCachedSize() const { + auto* cached_size = AccessCachedSize(); +- if (PROTOBUF_PREDICT_FALSE(cached_size == nullptr)) return ByteSize(); ++ if (PROTOBUF_PREDICT_FALSE(cached_size == nullptr)) return (int)ByteSizeLong(); + return cached_size->Get(); + } + diff --git a/source/extensions/transport_sockets/alts/alts_tsi_handshaker.cc b/source/extensions/transport_sockets/alts/alts_tsi_handshaker.cc index 4ad74601466c..6d48bc3ab9b2 100644 --- a/source/extensions/transport_sockets/alts/alts_tsi_handshaker.cc +++ b/source/extensions/transport_sockets/alts/alts_tsi_handshaker.cc @@ -142,7 +142,9 @@ AltsTsiHandshaker::getHandshakeResult(const grpc::gcp::HandshakerResult& result, tsi_zero_copy_grpc_protector* protector = nullptr; grpc_core::ExecCtx exec_ctx; tsi_result ok = alts_zero_copy_grpc_protector_create( - reinterpret_cast(result.key_data().data()), AltsAes128GcmRekeyKeyLength, true, + grpc_core::GsecKeyFactory( + {reinterpret_cast(result.key_data().data()), AltsAes128GcmRekeyKeyLength}, + /*is_rekey=*/true), is_client_, /*is_integrity_only=*/false, /*enable_extra_copy=*/false, &max_frame_size, &protector); if (ok != TSI_OK) {