Files
Sutou Kouhei b0492db231 GH-54638: [C++][FlightRPC] Upgrade bundled gRPC for OpenSSL 4 support (#54927)
### Rationale for this change

gRPC 1.76.0 doesn't compile with OpenSSL 4. gRPC 1.85.0 includes OpenSSL 4 support: https://github.com/grpc/grpc/pull/41932

### What changes are included in this PR?

gRPC 1.85.0 requires a newer Abseil. gRPC 1.76.0 doesn't compile with the newer Abseil. So we need to upgrade both of them together.

We use Abseil 20260817.0 not 20260526.0 that is used by gRPC 1.85.0 because Abseil 20260526.0 can't be built with MSVC with `/arch:AVX2`: https://github.com/abseil/abseil-cpp/issues/2116

gRPC 1.85.0 moved its .proto files to the third_party/grpc-proto submodule. Source archives don't include submodules and we disable gRPC_DOWNLOAD_ARCHIVES. So we download grpc-proto by ourselves.

Abseil 20260817.0 removed some libraries and added some new libraries. So we update the list of bundled Abseil libraries.

Abseil 20260817.0 uses `O_NONBLOCK` that isn't available on MinGW. So we define `O_NONBLOCK` as 0 for MinGW like the upstream fix: https://github.com/abseil/abseil-cpp/commit/ddbdebc6c8

Abseil 20260817.0 includes `<cstdint>` by itself. So we remove the `-include stdint.h` workaround for GCC 13 or later.

gRPC headers don't use deprecated `std::iterator`. So we remove the `-Wno-error=deprecated-declarations` workaround.
  
We didn't bundle upb static libraries used by gRPC. So static linking with `libarrow_bundled_dependencies.a` failed with undefined upb symbols. gRPC 1.85.0 also requires the new `upb_descriptor_lib`. So we bundle all upb static libraries.

Other bundled dependencies also need to be upgraded for the new Abseil:

Protobuf 31.1 can't be built with Abseil 20260817.0 with MSVC. So we upgrade bundled Protobuf to 36.2. Protobuf 36.2 headers include `utf8_validity.h` in utf8_range. So we add the utf8_range include directory for ORC built by ExternalProject.
          
google-cloud-cpp headers use deprecated Abseil APIs such as `absl::visit()`. They cause compilation errors with `-Werror` with Abseil 20260817.0. They are fixed in google-cloud-cpp 3.9.0 or later but google-cloud-cpp 3.9.0 or later requires libcurl 8.7.1 or later. We can't require it because some supported platforms such as Ubuntu 24.04 ship older libcurl. So we use `-Wno-error=deprecated-declarations` for bundled google-cloud-cpp instead of upgrading it.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.

### Was AI used for this PR?

In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.

**PR code and description written by:**

- [x] Human
- [x] AI

**Reviewed before submission by:**

- [x] Human
- [x] AI
- [ ] Not reviewed

* GitHub Issue: #54638

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Raúl Cumplido <raulcd@apache.org>
2026-10-26 08:47:15 +01:00
..

Arrow C++ Thirdparty Dependencies

See the "Build Dependency Management" section in the C++ Developer Documentation.

Update versions automatically

There is a convenient script that update versions in versions.txt to the latest version automatically. You can use it like the following:

cpp/thirdparty/update.rb PRODUCT_PATTERN1 PRODUCT_PATTERN2 ...

For example, you can update AWS SDK for C++ related products' versions by the following command line:

cpp/thirdparty/update.rb "AWS*" "S2N*"