Skip to content

Commit

Permalink
GH-45166: [CI][C++] Upgrade Alpine Linux to 3.18 from 3.16
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Jan 4, 2025
1 parent 48d5151 commit 3acb883
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -61,6 +62,7 @@ RUN apk add \
thrift-dev \
tzdata \
utf8proc-dev \
xsimd-dev \
zlib-dev \
zstd-dev && \
rm -rf /var/cache/apk/* && \
Expand Down Expand Up @@ -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
21 changes: 21 additions & 0 deletions cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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.
Expand Down
11 changes: 0 additions & 11 deletions cpp/src/arrow/testing/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,6 @@
// work if windows.h is already included.
# include <boost/asio/io_context.hpp>

# 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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3acb883

Please sign in to comment.