Skip to content

Commit f41f590

Browse files
authored
GH-45166: [CI][C++] Upgrade Alpine Linux to 3.18 from 3.16 (#45168)
### Rationale for this change Alpine Linux 3.16 reached EOL. ### What changes are included in this PR? Use Alpine Linux 3.18 that is the oldest maintained version. ### Are these changes tested? Yes. ### Are there any user-facing changes? No. * GitHub Issue: #45166 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
1 parent 8cff21f commit f41f590

File tree

6 files changed

+36
-19
lines changed

6 files changed

+36
-19
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ ULIMIT_CORE=-1
4747

4848
# Default versions for platforms
4949
ALMALINUX=8
50-
ALPINE_LINUX=3.16
50+
ALPINE_LINUX=3.18
5151
DEBIAN=12
5252
FEDORA=39
5353
UBUNTU=22.04

ci/docker/alpine-linux-3.16-cpp.dockerfile ci/docker/alpine-linux-3.18-cpp.dockerfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
# under the License.
1717

1818
ARG arch=amd64
19-
FROM ${arch}/alpine:3.16
19+
FROM ${arch}/alpine:3.18
2020

2121
RUN apk add \
22+
apache-orc-dev \
2223
bash \
2324
benchmark-dev \
2425
boost-dev \
@@ -39,8 +40,8 @@ RUN apk add \
3940
grpc-dev \
4041
gtest-dev \
4142
libxml2-dev \
42-
llvm13-dev \
43-
llvm13-static \
43+
llvm16-dev \
44+
llvm16-static \
4445
lz4-dev \
4546
make \
4647
musl-locales \
@@ -61,6 +62,7 @@ RUN apk add \
6162
thrift-dev \
6263
tzdata \
6364
utf8proc-dev \
65+
xsimd-dev \
6466
zlib-dev \
6567
zstd-dev && \
6668
rm -rf /var/cache/apk/* && \
@@ -98,6 +100,5 @@ ENV ARROW_ACERO=ON \
98100
ARROW_WITH_ZSTD=ON \
99101
AWSSDK_SOURCE=BUNDLED \
100102
google_cloud_cpp_storage_SOURCE=BUNDLED \
101-
ORC_SOURCE=BUNDLED \
102-
PATH=/usr/lib/ccache/:$PATH \
103-
xsimd_SOURCE=BUNDLED
103+
MUSL_LOCPATH=/usr/share/i18n/locales/musl \
104+
PATH=/usr/lib/ccache/bin:$PATH

cpp/cmake_modules/ThirdpartyToolchain.cmake

+17
Original file line numberDiff line numberDiff line change
@@ -1311,10 +1311,12 @@ if(ARROW_USE_BOOST)
13111311
endif()
13121312
endforeach()
13131313

1314+
set(BOOST_PROCESS_HAVE_V2 FALSE)
13141315
if(TARGET Boost::process)
13151316
# Boost >= 1.86
13161317
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V1")
13171318
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2")
1319+
set(BOOST_PROCESS_HAVE_V2 TRUE)
13181320
else()
13191321
# Boost < 1.86
13201322
add_library(Boost::process INTERFACE IMPORTED)
@@ -1329,6 +1331,7 @@ if(ARROW_USE_BOOST)
13291331
endif()
13301332
if(Boost_VERSION VERSION_GREATER_EQUAL 1.80)
13311333
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_HAVE_V2")
1334+
set(BOOST_PROCESS_HAVE_V2 TRUE)
13321335
# Boost < 1.86 has a bug that
13331336
# boost::process::v2::process_environment::on_setup() isn't
13341337
# defined. We need to build Boost Process source to define it.
@@ -1341,6 +1344,20 @@ if(ARROW_USE_BOOST)
13411344
endif()
13421345
endif()
13431346
endif()
1347+
if(BOOST_PROCESS_HAVE_V2
1348+
AND # We can't use v2 API on Windows because v2 API doesn't support
1349+
# process group[1] and GCS testbench uses multiple processes[2].
1350+
#
1351+
# [1] https://github.com/boostorg/process/issues/259
1352+
# [2] https://github.com/googleapis/storage-testbench/issues/669
1353+
(NOT WIN32)
1354+
AND # We can't use v2 API with musl libc with Boost Process < 1.86
1355+
# because Boost Process < 1.86 doesn't support musl libc[3].
1356+
#
1357+
# [3] https://github.com/boostorg/process/commit/aea22dbf6be1695ceb42367590b6ca34d9433500
1358+
(NOT (ARROW_WITH_MUSL AND (Boost_VERSION VERSION_LESS 1.86))))
1359+
target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_USE_V2")
1360+
endif()
13441361

13451362
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")
13461363
endif()

cpp/src/arrow/compute/kernels/scalar_temporal_test.cc

+10
Original file line numberDiff line numberDiff line change
@@ -2154,13 +2154,23 @@ TEST_F(ScalarTemporalTest, StrftimeOtherLocale) {
21542154
auto options = StrftimeOptions("%d %B %Y %H:%M:%S", "fr_FR.UTF-8");
21552155
const char* milliseconds = R"(
21562156
["1970-01-01T00:00:59.123", "2021-08-18T15:11:50.456", null])";
2157+
#ifdef ARROW_WITH_MUSL
2158+
// musl-locales uses Capital case for month name.
2159+
// musl doesn't use "," for milliseconds separator.
2160+
const char* expected = R"(
2161+
["01 Janvier 1970 00:00:59.123", "18 Août 2021 15:11:50.456", null])";
2162+
#else
21572163
const char* expected = R"(
21582164
["01 janvier 1970 00:00:59,123", "18 août 2021 15:11:50,456", null])";
2165+
#endif
21592166
CheckScalarUnary("strftime", timestamp(TimeUnit::MILLI, "UTC"), milliseconds, utf8(),
21602167
expected, &options);
21612168
}
21622169

21632170
TEST_F(ScalarTemporalTest, StrftimeInvalidLocale) {
2171+
#ifdef ARROW_WITH_MUSL
2172+
GTEST_SKIP() << "musl doesn't report an error for invalid locale";
2173+
#endif
21642174
#ifdef __EMSCRIPTEN__
21652175
GTEST_SKIP() << "Emscripten doesn't build with multiple locales as default";
21662176
#endif

cpp/src/arrow/testing/process.cc

-11
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,6 @@
3232
// work if windows.h is already included.
3333
# include <boost/asio/io_context.hpp>
3434

35-
# ifdef BOOST_PROCESS_HAVE_V2
36-
// We can't use v2 API on Windows because v2 API doesn't support
37-
// process group [1] and GCS testbench uses multiple processes [2].
38-
//
39-
// [1] https://github.com/boostorg/process/issues/259
40-
// [2] https://github.com/googleapis/storage-testbench/issues/669
41-
# ifndef _WIN32
42-
# define BOOST_PROCESS_USE_V2
43-
# endif
44-
# endif
45-
4635
# ifdef BOOST_PROCESS_USE_V2
4736
# ifdef BOOST_PROCESS_NEED_SOURCE
4837
// Workaround for https://github.com/boostorg/process/issues/312

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ services:
217217
# docker compose build alpine-linux-cpp
218218
# docker compose run --rm alpine-linux-cpp
219219
# Parameters:
220-
# ALPINE_LINUX: 3.16
220+
# ALPINE_LINUX: 3.18
221221
# ARCH: amd64, arm64v8, ...
222222
image: ${REPO}:${ARCH}-alpine-linux-${ALPINE_LINUX}-cpp
223223
build:

0 commit comments

Comments
 (0)