From 3acb883670c59bbd169f19f9155373be2e6b01ac Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Sat, 4 Jan 2025 16:33:00 +0900 Subject: [PATCH] GH-45166: [CI][C++] Upgrade Alpine Linux to 3.18 from 3.16 --- .env | 2 +- ...rfile => alpine-linux-3.18-cpp.dockerfile} | 12 +++++------ cpp/cmake_modules/ThirdpartyToolchain.cmake | 21 +++++++++++++++++++ cpp/src/arrow/testing/process.cc | 11 ---------- docker-compose.yml | 2 +- 5 files changed, 29 insertions(+), 19 deletions(-) rename ci/docker/{alpine-linux-3.16-cpp.dockerfile => alpine-linux-3.18-cpp.dockerfile} (94%) diff --git a/.env b/.env index 859672e7330cf..3db2673ae9594 100644 --- a/.env +++ b/.env @@ -47,7 +47,7 @@ ULIMIT_CORE=-1 # Default versions for platforms ALMALINUX=8 -ALPINE_LINUX=3.16 +ALPINE_LINUX=3.18 DEBIAN=12 FEDORA=39 UBUNTU=22.04 diff --git a/ci/docker/alpine-linux-3.16-cpp.dockerfile b/ci/docker/alpine-linux-3.18-cpp.dockerfile similarity index 94% rename from ci/docker/alpine-linux-3.16-cpp.dockerfile rename to ci/docker/alpine-linux-3.18-cpp.dockerfile index 72489c6eae1a7..84b36e5d2a717 100644 --- a/ci/docker/alpine-linux-3.16-cpp.dockerfile +++ b/ci/docker/alpine-linux-3.18-cpp.dockerfile @@ -16,9 +16,10 @@ # under the License. ARG arch=amd64 -FROM ${arch}/alpine:3.16 +FROM ${arch}/alpine:3.18 RUN apk add \ + apache-orc-dev \ bash \ benchmark-dev \ boost-dev \ @@ -39,8 +40,8 @@ RUN apk add \ grpc-dev \ gtest-dev \ libxml2-dev \ - llvm13-dev \ - llvm13-static \ + llvm16-dev \ + llvm16-static \ lz4-dev \ make \ musl-locales \ @@ -61,6 +62,7 @@ RUN apk add \ thrift-dev \ tzdata \ utf8proc-dev \ + xsimd-dev \ zlib-dev \ zstd-dev && \ rm -rf /var/cache/apk/* && \ @@ -98,6 +100,4 @@ ENV ARROW_ACERO=ON \ ARROW_WITH_ZSTD=ON \ AWSSDK_SOURCE=BUNDLED \ google_cloud_cpp_storage_SOURCE=BUNDLED \ - ORC_SOURCE=BUNDLED \ - PATH=/usr/lib/ccache/:$PATH \ - xsimd_SOURCE=BUNDLED + PATH=/usr/lib/ccache/:$PATH diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 1fc3654ec8d07..04b9fa7d92f2b 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -1315,6 +1315,14 @@ if(ARROW_USE_BOOST) # Boost >= 1.86 target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V1") target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2") + if(NOT WIN32) + # We can't use v2 API on Windows because v2 API doesn't support + # process group [1] and GCS testbench uses multiple processes [2]. + # + # [1] https://github.com/boostorg/process/issues/259 + # [2] https://github.com/googleapis/storage-testbench/issues/669 + target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_USE_V2") + endif() else() # Boost < 1.86 add_library(Boost::process INTERFACE IMPORTED) @@ -1329,6 +1337,19 @@ if(ARROW_USE_BOOST) endif() if(Boost_VERSION VERSION_GREATER_EQUAL 1.80) target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2") + if((NOT WIN32) AND (NOT ARROW_WITH_MUSL)) + # We can't use v2 API on Windows because v2 API doesn't support + # process group [1] and GCS testbench uses multiple processes [2]. + # + # [1] https://github.com/boostorg/process/issues/259 + # [2] https://github.com/googleapis/storage-testbench/issues/669 + # + # We can't use v2 API with musl libc because Boost Process < 1.86 + # doesn't support musl libc [3]. + # + # [3] https://github.com/boostorg/process/commit/aea22dbf6be1695ceb42367590b6ca34d9433500 + target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_USE_V2") + endif() # Boost < 1.86 has a bug that # boost::process::v2::process_environment::on_setup() isn't # defined. We need to build Boost Process source to define it. diff --git a/cpp/src/arrow/testing/process.cc b/cpp/src/arrow/testing/process.cc index 57df0196c117f..5f04b31aa15e0 100644 --- a/cpp/src/arrow/testing/process.cc +++ b/cpp/src/arrow/testing/process.cc @@ -32,17 +32,6 @@ // work if windows.h is already included. # include -# ifdef BOOST_PROCESS_HAVE_V2 -// We can't use v2 API on Windows because v2 API doesn't support -// process group [1] and GCS testbench uses multiple processes [2]. -// -// [1] https://github.com/boostorg/process/issues/259 -// [2] https://github.com/googleapis/storage-testbench/issues/669 -# ifndef _WIN32 -# define BOOST_PROCESS_USE_V2 -# endif -# endif - # ifdef BOOST_PROCESS_USE_V2 # ifdef BOOST_PROCESS_NEED_SOURCE // Workaround for https://github.com/boostorg/process/issues/312 diff --git a/docker-compose.yml b/docker-compose.yml index 51d5951ad61f4..af1b87e3eb3b0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -219,7 +219,7 @@ services: # docker compose build alpine-linux-cpp # docker compose run --rm alpine-linux-cpp # Parameters: - # ALPINE_LINUX: 3.16 + # ALPINE_LINUX: 3.18 # ARCH: amd64, arm64v8, ... image: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-cpp build: