diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 73b06f9deec5..84aa8a5d5ae5 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -441,7 +441,7 @@ jobs: - name: Install Dependencies run: | brew bundle --file=cpp/Brewfile - + # We want to use bundled RE2 for static linking. If # Homebrew's RE2 is installed, its header file may be used. # We uninstall Homebrew's RE2 to ensure using bundled RE2. @@ -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/amd64-windows-no-absl-sync-release.cmake + VCPKG_DEFAULT_TRIPLET: amd64-windows-no-absl-sync-release + VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/ci/vcpkg steps: - name: Disable Crash Dialogs run: | @@ -721,7 +730,7 @@ jobs: dev_msi_name=$(echo ${msi_name} | sed -e "s/win64\.msi$/dev-$(date +%Y-%m-%d)-win64.msi/") mv "${msi_name}" "${dev_msi_name}" cd .. - + tree odbc-installer - name: Checkout Arrow uses: actions/checkout@v6 diff --git a/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake b/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake new file mode 100644 index 000000000000..97c73e31464e --- /dev/null +++ b/ci/vcpkg/amd64-windows-no-absl-sync-release.cmake @@ -0,0 +1,27 @@ +# 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 +# Dynamic CRT/linkage and release-only to match that job. +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_BUILD_TYPE release) + +set(VCPKG_C_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC") +set(VCPKG_CXX_FLAGS "/DGPR_DISABLE_ABSEIL_SYNC")