From c38ed319bbb8e52c00bacab14acf1b7b48951ba0 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 25 Feb 2025 22:17:54 +0900 Subject: [PATCH 01/31] GH-45614: [C++] Use Boost's CMake packages instead of FindBoost.cmake in CMake --- cpp/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 9405a2eecad..3c628a20c35 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -71,6 +71,13 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() +# https://cmake.org/cmake/help/latest/policy/CMP0167.html +# +# Use Boost's CMake packages instead of FindBoost.cmake in CMake. +if(POLICY CMP0167) + cmake_policy(SET CMP0167 NEW) +endif() + # https://cmake.org/cmake/help/latest/policy/CMP0170.html # # CMP0170 is for enforcing dependency populations by users with From 77bbb9f492c42db6e5174d76c650653a9a9fb08b Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 25 Feb 2025 23:36:46 +0900 Subject: [PATCH 02/31] Remove workaround --- .github/workflows/ruby.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 7a29d35ee7b..525a6f59323 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -234,12 +234,9 @@ jobs: ARROW_WITH_SNAPPY: ON ARROW_WITH_ZLIB: ON ARROW_WITH_ZSTD: ON - # Don't use preinstalled Boost by empty BOOST_ROOT and - # -DBoost_NO_BOOST_CMAKE=ON BOOST_ROOT: "" ARROW_CMAKE_ARGS: >- -DARROW_PACKAGE_PREFIX=/ucrt${{ matrix.mingw-n-bits }} - -DBoost_NO_BOOST_CMAKE=ON -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON CMAKE_UNITY_BUILD: ON steps: From 726ceeac20d0777a2182cd20bc4e65cf0f40ddbc Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 26 Feb 2025 11:38:53 +0900 Subject: [PATCH 03/31] Use CMP0144 --- .github/workflows/cpp.yml | 2 -- .github/workflows/ruby.yml | 1 - cpp/CMakeLists.txt | 11 +++++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index cbb448cfa07..9b2fbbc336e 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -400,8 +400,6 @@ jobs: ARROW_WITH_SNAPPY: ON ARROW_WITH_ZLIB: ON ARROW_WITH_ZSTD: ON - # Don't use preinstalled Boost by empty BOOST_ROOT - BOOST_ROOT: "" ARROW_CMAKE_ARGS: >- -DARROW_PACKAGE_PREFIX=/${{ matrix.msystem_lower}} -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 525a6f59323..83535f29565 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -234,7 +234,6 @@ jobs: ARROW_WITH_SNAPPY: ON ARROW_WITH_ZLIB: ON ARROW_WITH_ZSTD: ON - BOOST_ROOT: "" ARROW_CMAKE_ARGS: >- -DARROW_PACKAGE_PREFIX=/ucrt${{ matrix.mingw-n-bits }} -DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3c628a20c35..6b6acb3e70b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -71,6 +71,17 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() +# https://cmake.org/cmake/help/latest/policy/CMP0144.html +# +# find_package() uses upper-case _ROOT variables. +# For example BOOST_ROOT is used for Boost. +# +# vcpkg sets BOOST_ROOT not Boost_ROOT. So we need to enable this +# to use Boost installed by vcpkg. +if(POLICY CMP0144) + cmake_policy(SET CMP0144 NEW) +endif() + # https://cmake.org/cmake/help/latest/policy/CMP0167.html # # Use Boost's CMake packages instead of FindBoost.cmake in CMake. From f39bf5fa9610679f3b97b562f5ff1e6adaf3a14f Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 26 Feb 2025 11:47:20 +0900 Subject: [PATCH 04/31] Debug --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 1259b9453a5..aaceb88b69b 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1284,6 +1284,7 @@ if(ARROW_USE_BOOST) set(ARROW_BOOST_COMPONENTS) set(ARROW_BOOST_OPTIONAL_COMPONENTS) endif() + set(CMAKE_FIND_DEBUG_MODE ON) resolve_dependency(Boost REQUIRED_VERSION ${ARROW_BOOST_REQUIRED_VERSION} @@ -1294,6 +1295,7 @@ if(ARROW_USE_BOOST) IS_RUNTIME_DEPENDENCY # libarrow.so doesn't depend on libboost*. FALSE) + set(CMAKE_FIND_DEBUG_MODE OFF) if(ARROW_BOOST_USE_SHARED) set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_KEEP}) unset(BUILD_SHARED_LIBS_KEEP) From 1a33ecae6399863980be85a31d4ad4a5af708f59 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 26 Feb 2025 12:07:00 +0900 Subject: [PATCH 05/31] Debug --- .github/workflows/ruby.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 83535f29565..20b19119167 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -420,6 +420,10 @@ jobs: --triplet $env:VCPKG_TRIPLET ` --x-manifest-root cpp ` --x-install-root build\cpp\vcpkg_installed + - name: Debug + shell: bash + run: | + find build/cpp/vcpkg_installed - name: Build C++ shell: cmd run: | From 3807d56c0bc02c764d798e78c29fbdd1770eaf1e Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 26 Feb 2025 14:02:28 +0900 Subject: [PATCH 06/31] Use boost-cmake --- cpp/CMakeLists.txt | 11 ----------- cpp/vcpkg.json | 3 ++- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 6b6acb3e70b..3c628a20c35 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -71,17 +71,6 @@ if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() -# https://cmake.org/cmake/help/latest/policy/CMP0144.html -# -# find_package() uses upper-case _ROOT variables. -# For example BOOST_ROOT is used for Boost. -# -# vcpkg sets BOOST_ROOT not Boost_ROOT. So we need to enable this -# to use Boost installed by vcpkg. -if(POLICY CMP0144) - cmake_policy(SET CMP0144 NEW) -endif() - # https://cmake.org/cmake/help/latest/policy/CMP0167.html # # Use Boost's CMake packages instead of FindBoost.cmake in CMake. diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index f67fdbf9071..a59be6bdee0 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -15,6 +15,7 @@ ] }, "benchmark", + "boost-cmake", "boost-crc", "boost-filesystem", "boost-multiprecision", @@ -54,5 +55,5 @@ "overrides": [ { "name": "gtest", "version": "1.10.0", "port-version": 4 } ], - "builtin-baseline": "3d8f78171a2a37d461077bf8d063256b63e25a4f" + "builtin-baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625" } From c3a70488aac1fb517ab43f1f78fde66c292a6d2f Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 26 Feb 2025 19:28:34 +0900 Subject: [PATCH 07/31] Use 2025.01.11 --- cpp/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index a59be6bdee0..02a27fe490e 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -55,5 +55,5 @@ "overrides": [ { "name": "gtest", "version": "1.10.0", "port-version": 4 } ], - "builtin-baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625" + "builtin-baseline": "6f29f12e82a8293156836ad81cc9bf5af41fe836" } From 54704c5d1219f0c12b14004a15f005de5c771c7f Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 06:42:40 +0900 Subject: [PATCH 08/31] Use windows-2022 --- .github/workflows/ruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 20b19119167..970e967c1ec 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -314,7 +314,7 @@ jobs: windows-msvc: name: AMD64 Windows MSVC GLib - runs-on: windows-2019 + runs-on: windows-2022 if: ${{ !contains(github.event.pull_request.title, 'WIP') }} timeout-minutes: 90 strategy: @@ -427,10 +427,10 @@ jobs: - name: Build C++ shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build" - name: Build GLib shell: cmd run: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 bash -c "ci/scripts/c_glib_build.sh $(pwd) $(pwd)/build" From cf77857c21ec6fb64a55a8507ad0e3595be6c329 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 06:54:55 +0900 Subject: [PATCH 09/31] Use pre-installed vcpkg --- .github/workflows/ruby.yml | 4 ---- cpp/vcpkg.json | 3 --- 2 files changed, 7 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 970e967c1ec..9e8d67d583d 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -372,10 +372,6 @@ jobs: with: fetch-depth: 0 submodules: recursive - - name: Install vcpkg - shell: bash - run: | - ci/scripts/install_vcpkg.sh "${VCPKG_ROOT}" - name: Install meson run: | python -m pip install meson diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index 02a27fe490e..c477eba8967 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -52,8 +52,5 @@ "zlib", "zstd" ], - "overrides": [ - { "name": "gtest", "version": "1.10.0", "port-version": 4 } - ], "builtin-baseline": "6f29f12e82a8293156836ad81cc9bf5af41fe836" } From fc1cf49547efac49e6ac17c186470d9e6a0a35e0 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 06:58:43 +0900 Subject: [PATCH 10/31] Use system vcpkg --- .github/workflows/ruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 9e8d67d583d..61293c7b409 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -400,19 +400,19 @@ jobs: - name: Setup NuGet credentials for vcpkg caching shell: bash run: | - $(vcpkg/vcpkg.exe fetch nuget | tail -n 1) \ + $(vcpkg fetch nuget | tail -n 1) \ sources add \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \ -storepasswordincleartext \ -name "GitHub" \ -username "$GITHUB_REPOSITORY_OWNER" \ -password "${{ secrets.GITHUB_TOKEN }}" - $(vcpkg/vcpkg.exe fetch nuget | tail -n 1) \ + $(vcpkg fetch nuget | tail -n 1) \ setapikey "${{ secrets.GITHUB_TOKEN }}" \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" - name: Build C++ vcpkg dependencies run: | - vcpkg\vcpkg.exe install ` + vcpkg install ` --triplet $env:VCPKG_TRIPLET ` --x-manifest-root cpp ` --x-install-root build\cpp\vcpkg_installed From 6a59f3ca8a3a0630b53bbbad6f82e9a5bffc2f15 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 07:01:41 +0900 Subject: [PATCH 11/31] Remove needless VCPKG_ROOT --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 61293c7b409..03201600fad 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -354,7 +354,6 @@ jobs: CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/dist" CMAKE_UNITY_BUILD: ON VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' - VCPKG_ROOT: "${{ github.workspace }}/vcpkg" VCPKG_TRIPLET: x64-windows permissions: packages: write From 502d38fa024792dee8594a9faeb5aec7bfddeee3 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 10:00:52 +0900 Subject: [PATCH 12/31] Increase timeout --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 03201600fad..19e1e8521d8 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -316,7 +316,7 @@ jobs: name: AMD64 Windows MSVC GLib runs-on: windows-2022 if: ${{ !contains(github.event.pull_request.title, 'WIP') }} - timeout-minutes: 90 + timeout-minutes: 180 strategy: fail-fast: false env: From c73095d64741003567adaee3f1c2d67b8c03fe28 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 14:45:34 +0900 Subject: [PATCH 13/31] Increase --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 19e1e8521d8..512b760bdde 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -316,7 +316,7 @@ jobs: name: AMD64 Windows MSVC GLib runs-on: windows-2022 if: ${{ !contains(github.event.pull_request.title, 'WIP') }} - timeout-minutes: 180 + timeout-minutes: 240 strategy: fail-fast: false env: From 475a1cf5d1745d421d678660952a4b7bf16b3b00 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 15:11:22 +0900 Subject: [PATCH 14/31] Disable vcpkg install --- .github/workflows/ruby.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 512b760bdde..767e91ee0c5 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -409,16 +409,16 @@ jobs: $(vcpkg fetch nuget | tail -n 1) \ setapikey "${{ secrets.GITHUB_TOKEN }}" \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" - - name: Build C++ vcpkg dependencies - run: | - vcpkg install ` - --triplet $env:VCPKG_TRIPLET ` - --x-manifest-root cpp ` - --x-install-root build\cpp\vcpkg_installed - - name: Debug - shell: bash - run: | - find build/cpp/vcpkg_installed + # - name: Build C++ vcpkg dependencies + # run: | + # vcpkg install ` + # --triplet $env:VCPKG_TRIPLET ` + # --x-manifest-root cpp ` + # --x-install-root build\cpp\vcpkg_installed + # - name: Debug + # shell: bash + # run: | + # find build/cpp/vcpkg_installed - name: Build C++ shell: cmd run: | From b2c00a22908b86b765c44022cd717dcfc1dc6ed4 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 16:59:44 +0900 Subject: [PATCH 15/31] Remove needless configuration --- cpp/cmake_modules/Usevcpkg.cmake | 92 -------------------------------- 1 file changed, 92 deletions(-) diff --git a/cpp/cmake_modules/Usevcpkg.cmake b/cpp/cmake_modules/Usevcpkg.cmake index b6192468da3..016cfd169e4 100644 --- a/cpp/cmake_modules/Usevcpkg.cmake +++ b/cpp/cmake_modules/Usevcpkg.cmake @@ -116,52 +116,9 @@ if(NOT DEFINED VCPKG_MANIFEST_MODE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg CACHE BOOL "Use vcpkg.json manifest") message(STATUS "vcpkg.json manifest found. Using VCPKG_MANIFEST_MODE: ON") endif() -# vcpkg can install packages in three different places -set(_INST_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/vcpkg_installed") # try here first -set(_INST_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg_installed") # try here second -set(_INST_VCPKG_ROOT "${VCPKG_ROOT}/installed") -# Iterate over the places -foreach(_INST_DIR ${_INST_BUILD_DIR} ${_INST_SOURCE_DIR} ${_INST_VCPKG_ROOT} "notfound") - if(_INST_DIR STREQUAL "notfound") - message(FATAL_ERROR "vcpkg installed libraries directory not found. " - "Install packages with vcpkg before executing cmake.") - elseif(NOT EXISTS "${_INST_DIR}") - continue() - elseif((_INST_DIR STREQUAL _INST_BUILD_DIR OR _INST_DIR STREQUAL _INST_SOURCE_DIR) - AND NOT VCPKG_MANIFEST_MODE) - # Do not look for packages in the build or source dirs if manifest mode is off - message(STATUS "Skipped looking for installed packages in ${_INST_DIR} " - "because -DVCPKG_MANIFEST_MODE=OFF") - continue() - else() - message(STATUS "Looking for installed packages in ${_INST_DIR}") - endif() - if(DEFINED VCPKG_TARGET_TRIPLET) - # Check if a subdirectory named VCPKG_TARGET_TRIPLET - # exists in the vcpkg installed directory - if(EXISTS "${_INST_DIR}/${VCPKG_TARGET_TRIPLET}") - set(_VCPKG_INSTALLED_DIR "${_INST_DIR}") - break() - endif() - else() - # Infer VCPKG_TARGET_TRIPLET from the name of the - # subdirectory in the vcpkg installed directory - list_subdirs(_VCPKG_TRIPLET_SUBDIRS "${_INST_DIR}") - list(REMOVE_ITEM _VCPKG_TRIPLET_SUBDIRS "vcpkg") - list(LENGTH _VCPKG_TRIPLET_SUBDIRS _NUM_VCPKG_TRIPLET_SUBDIRS) - if(_NUM_VCPKG_TRIPLET_SUBDIRS EQUAL 1) - list(GET _VCPKG_TRIPLET_SUBDIRS 0 VCPKG_TARGET_TRIPLET) - set(_VCPKG_INSTALLED_DIR "${_INST_DIR}") - break() - endif() - endif() -endforeach() if(NOT DEFINED VCPKG_TARGET_TRIPLET) message(FATAL_ERROR "Could not infer VCPKG_TARGET_TRIPLET. " "Specify triplet with -DVCPKG_TARGET_TRIPLET.") -elseif(NOT DEFINED _VCPKG_INSTALLED_DIR) - message(FATAL_ERROR "Could not find installed vcpkg packages for triplet ${VCPKG_TARGET_TRIPLET}. " - "Install packages with vcpkg before executing cmake.") endif() set(VCPKG_TARGET_TRIPLET @@ -201,52 +158,3 @@ set(ARROW_VCPKG set(ARROW_DEPENDENCY_SOURCE "SYSTEM" CACHE STRING "The specified value VCPKG is implemented internally as SYSTEM" FORCE) - -set(BOOST_ROOT - "${ARROW_VCPKG_PREFIX}" - CACHE STRING "") -set(BOOST_INCLUDEDIR - "${ARROW_VCPKG_PREFIX}/include/boost" - CACHE STRING "") -set(BOOST_LIBRARYDIR - "${ARROW_VCPKG_PREFIX}/lib" - CACHE STRING "") -set(OPENSSL_INCLUDE_DIR - "${ARROW_VCPKG_PREFIX}/include" - CACHE STRING "") -set(OPENSSL_LIBRARIES - "${ARROW_VCPKG_PREFIX}/lib" - CACHE STRING "") -set(OPENSSL_ROOT_DIR - "${ARROW_VCPKG_PREFIX}" - CACHE STRING "") -set(Thrift_ROOT - "${ARROW_VCPKG_PREFIX}/lib" - CACHE STRING "") -set(ZSTD_INCLUDE_DIR - "${ARROW_VCPKG_PREFIX}/include" - CACHE STRING "") -set(ZSTD_ROOT - "${ARROW_VCPKG_PREFIX}" - CACHE STRING "") -set(BROTLI_ROOT - "${ARROW_VCPKG_PREFIX}" - CACHE STRING "") -set(LZ4_ROOT - "${ARROW_VCPKG_PREFIX}" - CACHE STRING "") - -if(CMAKE_HOST_WIN32) - set(LZ4_MSVC_LIB_PREFIX - "" - CACHE STRING "") - set(LZ4_MSVC_STATIC_LIB_SUFFIX - "" - CACHE STRING "") - set(ZSTD_MSVC_LIB_PREFIX - "" - CACHE STRING "") - set(ZSTD_MSVC_STATIC_LIB_SUFFIX - "" - CACHE STRING "") -endif() From d01a18b259331cd80cf281dbceea9278bd07b905 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 17:16:24 +0900 Subject: [PATCH 16/31] Set VCPKG_DEFAULT_TRIPLET --- .github/workflows/ruby.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 767e91ee0c5..341fa7a2fe7 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -354,7 +354,7 @@ jobs: CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/dist" CMAKE_UNITY_BUILD: ON VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' - VCPKG_TRIPLET: x64-windows + VCPKG_DEFAULT_TRIPLET: x64-windows permissions: packages: write steps: @@ -412,7 +412,7 @@ jobs: # - name: Build C++ vcpkg dependencies # run: | # vcpkg install ` - # --triplet $env:VCPKG_TRIPLET ` + # --triplet $env:VCPKG_DEFAULT_TRIPLET ` # --x-manifest-root cpp ` # --x-install-root build\cpp\vcpkg_installed # - name: Debug From 2cc222a50c1cc681f8a5d684d5219724dd01acb1 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 17:24:07 +0900 Subject: [PATCH 17/31] Use zstd::libzstd --- cpp/cmake_modules/ThirdpartyToolchain.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index aaceb88b69b..149956f74cd 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -2745,6 +2745,10 @@ if(ARROW_WITH_ZSTD) else() set(ARROW_ZSTD_LIBZSTD zstd::libzstd_static) endif() + # vcpkg uses zstd::libzstd + if(NOT TARGET ${ARROW_ZSTD_LIBZSTD} AND TARGET zstd::libzstd) + set(ARROW_ZSTD_LIBZSTD zstd::libzstd) + endif() if(NOT TARGET ${ARROW_ZSTD_LIBZSTD}) message(FATAL_ERROR "Zstandard target doesn't exist: ${ARROW_ZSTD_LIBZSTD}") endif() From 8dfee0cfaa203996c58256e827c2d1080a47ed85 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Thu, 27 Feb 2025 20:33:44 +0900 Subject: [PATCH 18/31] Don't use unity build --- .github/workflows/ruby.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 341fa7a2fe7..51d39e1d60a 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -352,7 +352,6 @@ jobs: CMAKE_CXX_STANDARD: "17" CMAKE_GENERATOR: Ninja CMAKE_INSTALL_PREFIX: "${{ github.workspace }}/dist" - CMAKE_UNITY_BUILD: ON VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite' VCPKG_DEFAULT_TRIPLET: x64-windows permissions: From 2bedf70efe5e663d9e3c5ee4864ccf7c6211caf5 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 28 Feb 2025 15:39:09 +0900 Subject: [PATCH 19/31] Don't require VCPKG_ROOT --- ci/scripts/c_glib_build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh index e1421f1cc29..2575e70cbb9 100755 --- a/ci/scripts/c_glib_build.sh +++ b/ci/scripts/c_glib_build.sh @@ -41,9 +41,9 @@ meson_pkg_config_path="${ARROW_HOME}/lib/pkgconfig" mkdir -p "${build_dir}" -if [ -n "${VCPKG_ROOT:-}" ] && [ -n "${VCPKG_TRIPLET:-}" ]; then +if [ -n "${VCPKG_TRIPLET:-}" ]; then vcpkg_install_root="${build_root}/vcpkg_installed" - "${VCPKG_ROOT}/vcpkg" install \ + vcpkg install \ --x-manifest-root="${source_dir}" \ --x-install-root="${vcpkg_install_root}" PKG_CONFIG="${vcpkg_install_root}/${VCPKG_TRIPLET}/tools/pkgconf/pkgconf.exe" From 1e9ab92db87b88be26a76c6394f09352ca8763d4 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 28 Feb 2025 16:17:07 +0900 Subject: [PATCH 20/31] Use VCPKG_DEFAULT_TRIPLET --- ci/scripts/c_glib_build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh index 2575e70cbb9..54bd7e5645a 100755 --- a/ci/scripts/c_glib_build.sh +++ b/ci/scripts/c_glib_build.sh @@ -41,19 +41,19 @@ meson_pkg_config_path="${ARROW_HOME}/lib/pkgconfig" mkdir -p "${build_dir}" -if [ -n "${VCPKG_TRIPLET:-}" ]; then +if [ -n "${VCPKG_DEFAULT_TRIPLET:-}" ]; then vcpkg_install_root="${build_root}/vcpkg_installed" vcpkg install \ --x-manifest-root="${source_dir}" \ --x-install-root="${vcpkg_install_root}" - PKG_CONFIG="${vcpkg_install_root}/${VCPKG_TRIPLET}/tools/pkgconf/pkgconf.exe" + PKG_CONFIG="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/tools/pkgconf/pkgconf.exe" export PKG_CONFIG - meson_pkg_config_path="${vcpkg_install_root}/${VCPKG_TRIPLET}/lib/pkgconfig:${meson_pkg_config_path}" + meson_pkg_config_path="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/lib/pkgconfig:${meson_pkg_config_path}" # Configure PATH for libraries required by the gobject-introspection generated binary cpp_vcpkg_install_root="${build_root}/cpp/vcpkg_installed" - PATH="${cpp_vcpkg_install_root}/${VCPKG_TRIPLET}/debug/bin:${PATH}" - PATH="${cpp_vcpkg_install_root}/${VCPKG_TRIPLET}/bin:${PATH}" - PATH="${vcpkg_install_root}/${VCPKG_TRIPLET}/bin:${PATH}" + PATH="${cpp_vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/debug/bin:${PATH}" + PATH="${cpp_vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/bin:${PATH}" + PATH="${vcpkg_install_root}/${VCPKG_DEFAULT_TRIPLET}/bin:${PATH}" fi if [ -n "${VCToolsInstallDir:-}" ] && [ -n "${MSYSTEM:-}" ]; then From 8b267825b72ef9fcbca90fac963bb69a596c344c Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Fri, 28 Feb 2025 20:32:45 +0900 Subject: [PATCH 21/31] Pin glib < 1.80.0 --- c_glib/vcpkg.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index 5873fd9f28e..1b5b21f4a75 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -2,7 +2,10 @@ "name": "arrow-glib", "version-string": "20.0.0-SNAPSHOT", "dependencies": [ - "glib", + { + "name":"glib", + "version<": "1.80.0" + }, "gobject-introspection", "pkgconf" ] From c39cb16a037d8bb3a741a3be8ff9460fd5b845d5 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 1 Mar 2025 13:45:50 +0900 Subject: [PATCH 22/31] Add a comment --- c_glib/vcpkg.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index 1b5b21f4a75..91815d71a07 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -3,8 +3,9 @@ "version-string": "20.0.0-SNAPSHOT", "dependencies": [ { - "name":"glib", - "version<": "1.80.0" + "$comment": "We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.", + "name": "glib", + "version": "2.78.4" }, "gobject-introspection", "pkgconf" From 52f1a1721bfac9e1457323040746517e8ea10de3 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 1 Mar 2025 13:51:36 +0900 Subject: [PATCH 23/31] Remove needless codes --- .github/workflows/ruby.yml | 10 ---------- cpp/cmake_modules/ThirdpartyToolchain.cmake | 2 -- 2 files changed, 12 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 51d39e1d60a..db8d02784f4 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -408,16 +408,6 @@ jobs: $(vcpkg fetch nuget | tail -n 1) \ setapikey "${{ secrets.GITHUB_TOKEN }}" \ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" - # - name: Build C++ vcpkg dependencies - # run: | - # vcpkg install ` - # --triplet $env:VCPKG_DEFAULT_TRIPLET ` - # --x-manifest-root cpp ` - # --x-install-root build\cpp\vcpkg_installed - # - name: Debug - # shell: bash - # run: | - # find build/cpp/vcpkg_installed - name: Build C++ shell: cmd run: | diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 149956f74cd..f1bcb186813 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1284,7 +1284,6 @@ if(ARROW_USE_BOOST) set(ARROW_BOOST_COMPONENTS) set(ARROW_BOOST_OPTIONAL_COMPONENTS) endif() - set(CMAKE_FIND_DEBUG_MODE ON) resolve_dependency(Boost REQUIRED_VERSION ${ARROW_BOOST_REQUIRED_VERSION} @@ -1295,7 +1294,6 @@ if(ARROW_USE_BOOST) IS_RUNTIME_DEPENDENCY # libarrow.so doesn't depend on libboost*. FALSE) - set(CMAKE_FIND_DEBUG_MODE OFF) if(ARROW_BOOST_USE_SHARED) set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_KEEP}) unset(BUILD_SHARED_LIBS_KEEP) From 6db503266ed68dcab8f03296ebae56c7270a555c Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 1 Mar 2025 13:58:07 +0900 Subject: [PATCH 24/31] Fix style --- c_glib/vcpkg.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index 91815d71a07..63375c944ae 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -3,7 +3,8 @@ "version-string": "20.0.0-SNAPSHOT", "dependencies": [ { - "$comment": "We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.", + "$comment": + "We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.", "name": "glib", "version": "2.78.4" }, From cfa4bdd9b9165c2d43b0dc992cd7f2934f71797d Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 23 Mar 2025 15:09:39 +0900 Subject: [PATCH 25/31] Use overrides --- c_glib/vcpkg.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index 63375c944ae..f0777c2e0df 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -2,13 +2,16 @@ "name": "arrow-glib", "version-string": "20.0.0-SNAPSHOT", "dependencies": [ + "glib", + "gobject-introspection", + "pkgconf" + ], + "overrides": [ { "$comment": "We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.", "name": "glib", "version": "2.78.4" - }, - "gobject-introspection", - "pkgconf" + } ] } From 8933bcd183e0b05920b4b2bdd31593821bd4b412 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 23 Mar 2025 17:03:59 +0900 Subject: [PATCH 26/31] Specify builtin-baseline --- c_glib/vcpkg.json | 2 ++ cpp/vcpkg.json | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index f0777c2e0df..9618f40468f 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -6,6 +6,8 @@ "gobject-introspection", "pkgconf" ], + "$comment": "2025.03.19", + "builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c", "overrides": [ { "$comment": diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index c477eba8967..211d353c99a 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -52,5 +52,6 @@ "zlib", "zstd" ], - "builtin-baseline": "6f29f12e82a8293156836ad81cc9bf5af41fe836" + "$comment": "2025.03.19", + "builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c" } From 01d4760ab639d40179ca0b3f9b42bb394ac9838c Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sun, 23 Mar 2025 22:53:09 +0900 Subject: [PATCH 27/31] Use 2025.02.14 --- c_glib/vcpkg.json | 4 ++-- cpp/vcpkg.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index 9618f40468f..c7dd303c3b2 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -6,8 +6,8 @@ "gobject-introspection", "pkgconf" ], - "$comment": "2025.03.19", - "builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c", + "$comment": "2025.02.14", + "builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf", "overrides": [ { "$comment": diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index 211d353c99a..6eb24ad1803 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -52,6 +52,6 @@ "zlib", "zstd" ], - "$comment": "2025.03.19", - "builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c" + "$comment": "2025.02.14", + "builtin-baseline": "d5ec528843d29e3a52d745a64b469f810b2cedbf" } From 1cef8ff614f38080cec217fd70f313674b5e44cc Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Mon, 24 Mar 2025 12:03:48 +0900 Subject: [PATCH 28/31] Use Meson that could built GLib 2.78.4 --- c_glib/vcpkg.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index c7dd303c3b2..ffe7d127e0f 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -14,6 +14,10 @@ "We need gobject-introspection 1.80.0 or later for GLib 2.80.0 but vcpkg doesn't provide it yet.", "name": "glib", "version": "2.78.4" + }, + { + "name": "meson", + "version": "1.3.2" } ] } From 386e84e9ccb5930c54fb7745ec35c2bddc4081fb Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 25 Mar 2025 08:23:28 +0900 Subject: [PATCH 29/31] Fix Meson package name --- c_glib/vcpkg.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/c_glib/vcpkg.json b/c_glib/vcpkg.json index ffe7d127e0f..df4508d2973 100644 --- a/c_glib/vcpkg.json +++ b/c_glib/vcpkg.json @@ -16,7 +16,7 @@ "version": "2.78.4" }, { - "name": "meson", + "name": "vcpkg-tool-meson", "version": "1.3.2" } ] From aac1fccd33e0c63ee93e509e539358e3e327c8b7 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 31 Mar 2025 15:35:00 +0200 Subject: [PATCH 30/31] Dummy change for AppVeyor --- cpp/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 3c628a20c35..094887f25f4 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -768,3 +768,4 @@ config_summary_message() if(${ARROW_BUILD_CONFIG_SUMMARY_JSON}) config_summary_json() endif() + From ba6d53877cb8ca9e499d05183f55b0f8c4f65c24 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Mon, 31 Mar 2025 16:05:13 +0200 Subject: [PATCH 31/31] Undo dummy change --- cpp/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 094887f25f4..3c628a20c35 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -768,4 +768,3 @@ config_summary_message() if(${ARROW_BUILD_CONFIG_SUMMARY_JSON}) config_summary_json() endif() -