Files
arrow/cpp/cmake_modules/protobuf-emscripten.patch
Raúl CumplidoandSutou Kouhei b95645d213 GH-48926: [C++] Upgrade Abseil/Protobuf/GRPC/Google-Cloud-CPP bundled versions (#48964)
### Rationale for this change

The versions we are currently using are really old. There are several advantages on using newer bundled versions but in general they'll bring bug fixes, security fixes and new features.

### What changes are included in this PR?

- Update ABSL from `20211102.0` to `20250127.0`
- Remove now unnecessary CRC32C
- Update Google Cloud CPP from `v2.22.0` to `v3.2.0`
- Updatge gRPC from `v1.46.3` to `v1.76.0`
- Update Protobuf from `v21.3` to `v31.1`
- Older Ubuntu, Debian and RHEL will have to bundle newer ABSL due to CRC32C requirements.
- A couple of minor patches required for Google Cloud old MINGW and protobuf emscripten builds.
- Other minor changes and requirements to build.

### Are these changes tested?

Yes via CI

### Are there any user-facing changes?

Not directly but some old versions (like compiling Google Cloud with old system Abseil) might stop working.

* GitHub Issue: #48926

Lead-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
2026-04-15 12:12:57 +02:00

40 lines
1.9 KiB
Diff

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
--- a/src/google/protobuf/port_def.inc
+++ b/src/google/protobuf/port_def.inc
@@ -435,13 +435,15 @@
# endif
#else
-# if defined(__cpp_constinit) && !defined(__CYGWIN__)
+// Emscripten's libc++ std::string is not constexpr-constructible (heap alloc).
+# if defined(__cpp_constinit) && !defined(__CYGWIN__) && !defined(__EMSCRIPTEN__)
# define PROTOBUF_CONSTINIT constinit
# define PROTOBUF_CONSTEXPR constexpr
# define PROTOBUF_CONSTINIT_DEFAULT_INSTANCES
// Some older Clang versions incorrectly raise an error about
// constant-initializing weak default instance pointers. Versions 12.0 and
// higher seem to work, except that XCode 12.5.1 shows the error even though it
// uses Clang 12.0.5.
-#elif !defined(__CYGWIN__) && !defined(__MINGW32__) && \
+#elif !defined(__CYGWIN__) && !defined(__MINGW32__) && \
+ !defined(__EMSCRIPTEN__) && \
ABSL_HAVE_CPP_ATTRIBUTE(clang::require_constant_initialization) && \
((defined(__APPLE__) && PROTOBUF_CLANG_MIN(13, 0)) || \
(!defined(__APPLE__) && PROTOBUF_CLANG_MIN(12, 0)))