hiroyuki-sato commented on PR #50887:
URL: https://github.com/apache/arrow/pull/50887#issuecomment-5341649015
I believe the two CI failures are unrelated to this PR.
I tried the following three approaches. Approaches 1 and 3 worked, while
approach 2 failed to build.
Thank you @kou
The current PR implements approach 3.
### 1. Use the bundled Abseil
- Use the bundled Abseil 20250127.0 for the `ARM64 macOS GLib & Ruby` build.
- Skip the `red-arrow-flight` tests on macOS because they fail.
With this approach, a bit more work is needed because Protobuf and gRPC
still appear to use the Homebrew version of Abseil.
```diff
diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml
index 2794d55ba8..370a161e6d 100644
--- a/.github/workflows/ruby.yml
+++ b/.github/workflows/ruby.yml
@@ -158,6 +158,14 @@ jobs:
ARROW_WITH_SNAPPY: ON
ARROW_WITH_ZLIB: ON
ARROW_WITH_ZSTD: ON
+ absl_SOURCE: BUNDLED
steps:
- name: Checkout Arrow
uses: actions/checkout@v7
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")
```
### 2. Pass compiler flags
I couldn't get this approach to build, so I abandoned it.
```diff
diff --git a/cpp/src/arrow/filesystem/gcsfs.cc
b/cpp/src/arrow/filesystem/gcsfs.cc
index ffeba9eadc..b7b13aff7d 100644
--- a/cpp/src/arrow/filesystem/gcsfs.cc
+++ b/cpp/src/arrow/filesystem/gcsfs.cc
@@ -353,7 +353,9 @@ class GcsFileSystem::Impl {
// "Directory" convention, so if there is at least one object that
// matches the prefix we assume it is a directory.
std::string canonical = internal::EnsureTrailingSlash(path.object);
+ ARROW_SUPPRESS_DEPRECATION_WARNING
auto list_result = client_.ListObjects(path.bucket,
gcs::Prefix(canonical));
+ ARROW_UNSUPPRESS_DEPRECATION_WARNING
for (auto&& object_metadata : list_result) {
if (!object_metadata) {
```
### 3. Change the compiler flags only when building the GCS-related
components
This is the approach implemented in the current PR.
```diff
diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
index 2569b9bcd4..39b3bb5ac1 100644
--- a/cpp/src/arrow/CMakeLists.txt
+++ b/cpp/src/arrow/CMakeLists.txt
@@ -983,6 +983,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/apache/arrow/issues/50868
+ 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)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]