diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 73b06f9deec5..5647f70b6d39 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -554,10 +554,19 @@ jobs: ARROW_FLIGHT_SQL_ODBC: ON ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON ARROW_HOME: /usr + # GH-49465: work around the gRPC/Abseil exit hang on Windows + # https://github.com/grpc/grpc/issues/39321 + # https://github.com/abseil/abseil-cpp/issues/1877 + # Build Arrow with GPR_DISABLE_ABSEIL_SYNC so grpcpp's Mutex ABI + # matches the gRPC rebuilt by the overlay triplet. Remove once fixed upstream. + ARROW_CXXFLAGS: -DGPR_DISABLE_ABSEIL_SYNC CMAKE_GENERATOR: Ninja CMAKE_INSTALL_PREFIX: /usr VCPKG_BINARY_SOURCES: 'clear;nugettimeout,600;nuget,GitHub,readwrite' - VCPKG_DEFAULT_TRIPLET: x64-windows + # GH-49465: custom triplet that rebuilds gRPC with GPR_DISABLE_ABSEIL_SYNC + # (native sync instead of absl::Mutex). See ci/vcpkg/overlay-triplets-no-absl-sync. + VCPKG_DEFAULT_TRIPLET: x64-windows-no-absl-sync + VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/ci/vcpkg/overlay-triplets-no-absl-sync steps: - name: Disable Crash Dialogs run: | diff --git a/ci/vcpkg/overlay-triplets-no-absl-sync/x64-windows-no-absl-sync.cmake b/ci/vcpkg/overlay-triplets-no-absl-sync/x64-windows-no-absl-sync.cmake new file mode 100644 index 000000000000..129977b05d2a --- /dev/null +++ b/ci/vcpkg/overlay-triplets-no-absl-sync/x64-windows-no-absl-sync.cmake @@ -0,0 +1,24 @@ +# 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. + +# GH-49465: rebuild gRPC with native sync instead of absl::Mutex to avoid the +# Windows exit hang. See the ODBC Windows job in cpp_extra.yml +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_C_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC") +set(VCPKG_CXX_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC")