From ad4f4f582c728f61901613b5bf5103b6ccf68620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Fri, 20 Nov 2026 13:14:08 +0100 Subject: [PATCH 1/5] GH-55693: [CI][C++] Workaround absl::Mutex ABI incompatibility by making sure the non-debug version of Abseil is included --- cpp/examples/arrow/CMakeLists.txt | 9 ++++++ cpp/examples/arrow/absl_mutex_ndebug.h | 38 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 cpp/examples/arrow/absl_mutex_ndebug.h diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt index 82c075c51df1..7c31c4b29d06 100644 --- a/cpp/examples/arrow/CMakeLists.txt +++ b/cpp/examples/arrow/CMakeLists.txt @@ -126,6 +126,15 @@ if(ARROW_FLIGHT) EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc" "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc") + if(NOT MSVC) + # Work around absl::Mutex::Dtor ABI mismatch in debug builds against + # an NDEBUG-built Abseil. See absl_mutex_ndebug.h. + # Same issue as: + # https://github.com/apache/arrow/blob/d58f83f3131cb57ede40d99ac4d0978748d1a970/cpp/src/arrow/flight/transport/grpc/customize_grpc.h#L25-L59 + target_compile_options(flight-grpc-example + PRIVATE "SHELL:-include ${CMAKE_CURRENT_SOURCE_DIR}/absl_mutex_ndebug.h" + ) + endif() if(ARROW_FLIGHT_SQL) if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED) diff --git a/cpp/examples/arrow/absl_mutex_ndebug.h b/cpp/examples/arrow/absl_mutex_ndebug.h new file mode 100644 index 000000000000..6c6aa525313b --- /dev/null +++ b/cpp/examples/arrow/absl_mutex_ndebug.h @@ -0,0 +1,38 @@ +// 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. + +#pragma once + +// Force-included into the flight-grpc-example sources (including the +// protoc-generated ones, which we can't edit). Same workaround as +// arrow/flight/transport/grpc/customize_grpc.h, added in GH-45885: +// Abseil built with NDEBUG (e.g. conda-forge) doesn't export +// Mutex::Dtor(), so debug TUs that inline ~Mutex() (via +// grpc::CompletionQueue) fail to link. +// See https://github.com/abseil/abseil-cpp/issues/1624 +// and https://github.com/conda-forge/abseil-cpp-feedstock/issues/104 +#if __has_include() +# ifndef NDEBUG +# define ARROW_EXAMPLE_NO_NDEBUG +# define NDEBUG +# endif +# include +# ifdef ARROW_EXAMPLE_NO_NDEBUG +# undef NDEBUG +# undef ARROW_EXAMPLE_NO_NDEBUG +# endif +#endif From eaf686825ccce5f87e995a5344327e4807f4cc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 23 Nov 2026 10:51:42 +0100 Subject: [PATCH 2/5] Remove ORC pin to try and bump protobuf and abseil on conda --- ci/conda_env_cpp.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/conda_env_cpp.txt b/ci/conda_env_cpp.txt index 24911fb35ac2..c6c507e8508c 100644 --- a/ci/conda_env_cpp.txt +++ b/ci/conda_env_cpp.txt @@ -40,7 +40,7 @@ make meson ninja nodejs>=16 -orc<2.1.0 +orc pkg-config python rapidjson From f71d4f81b09d4c563ac9c79c4502f542c4fff377 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 23 Nov 2026 11:27:40 +0100 Subject: [PATCH 3/5] Minor fix for [[nodiscard]] on newer protobuf --- cpp/src/arrow/flight/flight_benchmark.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/flight/flight_benchmark.cc b/cpp/src/arrow/flight/flight_benchmark.cc index aa6e16820efb..1783ed284192 100644 --- a/cpp/src/arrow/flight/flight_benchmark.cc +++ b/cpp/src/arrow/flight/flight_benchmark.cc @@ -282,7 +282,9 @@ Status DoSinglePerfRun(FlightClient* client, const FlightClientOptions client_op // Plan the query FlightDescriptor descriptor; descriptor.type = FlightDescriptor::CMD; - perf.SerializeToString(&descriptor.cmd); + if (!perf.SerializeToString(&descriptor.cmd)) { + return Status::Invalid("cannot serialize perf command"); + } ARROW_ASSIGN_OR_RAISE(auto plan, client->GetFlightInfo(call_options, descriptor)); @@ -307,7 +309,9 @@ Status DoSinglePerfRun(FlightClient* client, const FlightClientOptions client_op } perf::Token token; - token.ParseFromString(endpoint.ticket.ticket); + if (!token.ParseFromString(endpoint.ticket.ticket)) { + return Status::Invalid("cannot parse ticket"); + } const auto& result = test_loop(data_client, call_options, token, endpoint, stats); if (result.ok()) { From 5dd7ea466510c322709ba0f728aaffe01cd39870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 23 Nov 2026 11:28:13 +0100 Subject: [PATCH 4/5] Revert "GH-55693: [CI][C++] Workaround absl::Mutex ABI incompatibility by making sure the non-debug version of Abseil is included" This reverts commit ad4f4f582c728f61901613b5bf5103b6ccf68620. --- cpp/examples/arrow/CMakeLists.txt | 9 ------ cpp/examples/arrow/absl_mutex_ndebug.h | 38 -------------------------- 2 files changed, 47 deletions(-) delete mode 100644 cpp/examples/arrow/absl_mutex_ndebug.h diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt index 7c31c4b29d06..82c075c51df1 100644 --- a/cpp/examples/arrow/CMakeLists.txt +++ b/cpp/examples/arrow/CMakeLists.txt @@ -126,15 +126,6 @@ if(ARROW_FLIGHT) EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc" "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc") - if(NOT MSVC) - # Work around absl::Mutex::Dtor ABI mismatch in debug builds against - # an NDEBUG-built Abseil. See absl_mutex_ndebug.h. - # Same issue as: - # https://github.com/apache/arrow/blob/d58f83f3131cb57ede40d99ac4d0978748d1a970/cpp/src/arrow/flight/transport/grpc/customize_grpc.h#L25-L59 - target_compile_options(flight-grpc-example - PRIVATE "SHELL:-include ${CMAKE_CURRENT_SOURCE_DIR}/absl_mutex_ndebug.h" - ) - endif() if(ARROW_FLIGHT_SQL) if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED) diff --git a/cpp/examples/arrow/absl_mutex_ndebug.h b/cpp/examples/arrow/absl_mutex_ndebug.h deleted file mode 100644 index 6c6aa525313b..000000000000 --- a/cpp/examples/arrow/absl_mutex_ndebug.h +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -#pragma once - -// Force-included into the flight-grpc-example sources (including the -// protoc-generated ones, which we can't edit). Same workaround as -// arrow/flight/transport/grpc/customize_grpc.h, added in GH-45885: -// Abseil built with NDEBUG (e.g. conda-forge) doesn't export -// Mutex::Dtor(), so debug TUs that inline ~Mutex() (via -// grpc::CompletionQueue) fail to link. -// See https://github.com/abseil/abseil-cpp/issues/1624 -// and https://github.com/conda-forge/abseil-cpp-feedstock/issues/104 -#if __has_include() -# ifndef NDEBUG -# define ARROW_EXAMPLE_NO_NDEBUG -# define NDEBUG -# endif -# include -# ifdef ARROW_EXAMPLE_NO_NDEBUG -# undef NDEBUG -# undef ARROW_EXAMPLE_NO_NDEBUG -# endif -#endif From 88f5dff32f5bd0cf0cc9126d49c56cf2caf2abd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Mon, 23 Nov 2026 12:02:20 +0100 Subject: [PATCH 5/5] Reapply "GH-55693: [CI][C++] Workaround absl::Mutex ABI incompatibility by making sure the non-debug version of Abseil is included" This reverts commit 5dd7ea466510c322709ba0f728aaffe01cd39870. --- cpp/examples/arrow/CMakeLists.txt | 9 ++++++ cpp/examples/arrow/absl_mutex_ndebug.h | 38 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 cpp/examples/arrow/absl_mutex_ndebug.h diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt index 82c075c51df1..7c31c4b29d06 100644 --- a/cpp/examples/arrow/CMakeLists.txt +++ b/cpp/examples/arrow/CMakeLists.txt @@ -126,6 +126,15 @@ if(ARROW_FLIGHT) EXTRA_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/helloworld.pb.cc" "${CMAKE_CURRENT_BINARY_DIR}/helloworld.grpc.pb.cc") + if(NOT MSVC) + # Work around absl::Mutex::Dtor ABI mismatch in debug builds against + # an NDEBUG-built Abseil. See absl_mutex_ndebug.h. + # Same issue as: + # https://github.com/apache/arrow/blob/d58f83f3131cb57ede40d99ac4d0978748d1a970/cpp/src/arrow/flight/transport/grpc/customize_grpc.h#L25-L59 + target_compile_options(flight-grpc-example + PRIVATE "SHELL:-include ${CMAKE_CURRENT_SOURCE_DIR}/absl_mutex_ndebug.h" + ) + endif() if(ARROW_FLIGHT_SQL) if(ARROW_BUILD_SHARED AND ARROW_GRPC_USE_SHARED) diff --git a/cpp/examples/arrow/absl_mutex_ndebug.h b/cpp/examples/arrow/absl_mutex_ndebug.h new file mode 100644 index 000000000000..6c6aa525313b --- /dev/null +++ b/cpp/examples/arrow/absl_mutex_ndebug.h @@ -0,0 +1,38 @@ +// 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. + +#pragma once + +// Force-included into the flight-grpc-example sources (including the +// protoc-generated ones, which we can't edit). Same workaround as +// arrow/flight/transport/grpc/customize_grpc.h, added in GH-45885: +// Abseil built with NDEBUG (e.g. conda-forge) doesn't export +// Mutex::Dtor(), so debug TUs that inline ~Mutex() (via +// grpc::CompletionQueue) fail to link. +// See https://github.com/abseil/abseil-cpp/issues/1624 +// and https://github.com/conda-forge/abseil-cpp-feedstock/issues/104 +#if __has_include() +# ifndef NDEBUG +# define ARROW_EXAMPLE_NO_NDEBUG +# define NDEBUG +# endif +# include +# ifdef ARROW_EXAMPLE_NO_NDEBUG +# undef NDEBUG +# undef ARROW_EXAMPLE_NO_NDEBUG +# endif +#endif