This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 6b429a0fea GH-50868: [C++][CI] Suppress deprecated Abseil API warnings
for GCS on macOS (#50887)
6b429a0fea is described below
commit 6b429a0fead3d008aec8fe4e8ae2e385c2c3c2d2
Author: Hiroyuki Sato <[email protected]>
AuthorDate: Thu Aug 20 06:21:41 2026 +0900
GH-50868: [C++][CI] Suppress deprecated Abseil API warnings for GCS on
macOS (#50887)
### Rationale for this change
Around August 10, 2026, the `ARM64 macOS GLib & Ruby` job in this project
started failing.
The failure appears to have been caused by the Abseil version used when
building the bundled google-cloud-cpp on macOS being updated to `20260526.0`.
https://github.com/Homebrew/homebrew-core/blob/3decf2e9073cb08af3b4d5be7623f333f41fa3cc/Formula/a/abseil.rb
In Abseil LTS `20260526.0`, many polyfill types and related APIs provided
for pre-C++17 environments were marked as deprecated. Users are encouraged to
migrate to the corresponding C++ standard library APIs.
https://github.com/abseil/abseil-cpp/releases/tag/20260526.0
The build failure occurs at the following code in google-cloud-cpp:
```cpp
/Users/runner/work/arrow/arrow/build/cpp/_deps/google_cloud_cpp-src/google/cloud/stream_range.h:208:11:
error: 'visit<UnpackVariant, std::variant<google::cloud::Status,
google::cloud::storage::ObjectMetadata>>' is deprecated
[-Werror,-Wdeprecated-declarations]
208 | absl::visit(UnpackVariant{*this}, std::move(v));
| ^
```
`absl::visit` has not been removed, but using it with Abseil `20260526.0`
produces a deprecation warning. This would normally remain a warning, but
Apache Arrow's CI uses `-Werror`, which causes the deprecation warning to be
treated as a compilation error.
For C++17 and later, using `std::visit` is recommended:
```cpp
std::visit(UnpackVariant{*this}, std::move(v));
```
However, `absl::visit` is still used in the latest google-cloud-cpp source.
https://github.com/googleapis/google-cloud-cpp/blob/main/google/cloud/stream_range.h#L206-L208
A fundamental fix will likely be required in google-cloud-cpp.
### What changes are included in this PR?
* Add `-Wno-error=deprecated-declarations` to avoid build failures caused
by deprecation warnings.
* Skip the red-arrow-flight tests on macOS because they currently fail.
This will be addressed in a separate issue.
### Are these changes tested?
Yes.
### Are there any user-facing changes?
No.
* GitHub Issue: #50868
Lead-authored-by: Hiroyuki Sato <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
c_glib/test/flight-sql/test-client.rb | 2 +-
cpp/src/arrow/CMakeLists.txt | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/c_glib/test/flight-sql/test-client.rb
b/c_glib/test/flight-sql/test-client.rb
index 631eb3d542..1ed7f7e6e4 100644
--- a/c_glib/test/flight-sql/test-client.rb
+++ b/c_glib/test/flight-sql/test-client.rb
@@ -23,7 +23,7 @@ class TestFlightSQLClient < Test::Unit::TestCase
@server = nil
omit("Arrow Flight SQL is required") unless defined?(ArrowFlightSQL)
omit("Unstable on Windows") if Gem.win_platform?
- omit("Unstable on x86_64 macOS") if /x86_64-darwin/.match?(RUBY_PLATFORM)
+ omit("Unstable on macOS") if /darwin/.match?(RUBY_PLATFORM)
@server = Helper::FlightSQLServer.new
host = "127.0.0.1"
location = ArrowFlight::Location.new("grpc://#{host}:0")
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index c5bc01c8ef..b9ff2ffa2c 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -998,6 +998,13 @@ if(ARROW_FILESYSTEM)
"-Wno-documentation;-Wno-documentation-deprecated-sync"
)
endif()
+ # Workaround deprecated Abseil APIs used by google-cloud-cpp on macOS
+ # https://github.com/googleapis/google-cloud-cpp/issues/16354
+ if(APPLE)
+ set_property(SOURCE filesystem/gcsfs.cc filesystem/gcsfs_internal.cc
+ APPEND
+ PROPERTY COMPILE_OPTIONS
"-Wno-error=deprecated-declarations")
+ endif()
endif()
if(ARROW_HDFS)
list(APPEND ARROW_FILESYSTEM_SRCS filesystem/hdfs.cc)