This is an automated email from the ASF dual-hosted git repository.
assignuser pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new f41f59066b GH-45166: [CI][C++] Upgrade Alpine Linux to 3.18 from 3.16
(#45168)
f41f59066b is described below
commit f41f59066b79fbf59719e68ef0f908afd6c5218c
Author: Sutou Kouhei <[email protected]>
AuthorDate: Tue Jan 7 11:11:41 2025 +0900
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 <[email protected]>
Signed-off-by: Jacob Wujciak-Jens <[email protected]>
---
.env | 2 +-
...-cpp.dockerfile => alpine-linux-3.18-cpp.dockerfile} | 13 +++++++------
cpp/cmake_modules/ThirdpartyToolchain.cmake | 17 +++++++++++++++++
cpp/src/arrow/compute/kernels/scalar_temporal_test.cc | 10 ++++++++++
cpp/src/arrow/testing/process.cc | 11 -----------
docker-compose.yml | 2 +-
6 files changed, 36 insertions(+), 19 deletions(-)
diff --git a/.env b/.env
index 859672e733..3db2673ae9 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 92%
rename from ci/docker/alpine-linux-3.16-cpp.dockerfile
rename to ci/docker/alpine-linux-3.18-cpp.dockerfile
index 72489c6eae..60815b7e55 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,5 @@ 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
+ MUSL_LOCPATH=/usr/share/i18n/locales/musl \
+ PATH=/usr/lib/ccache/bin:$PATH
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 1fc3654ec8..abfe6d274f 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1311,10 +1311,12 @@ if(ARROW_USE_BOOST)
endif()
endforeach()
+ set(BOOST_PROCESS_HAVE_V2 FALSE)
if(TARGET Boost::process)
# Boost >= 1.86
target_compile_definitions(Boost::process INTERFACE
"BOOST_PROCESS_HAVE_V1")
target_compile_definitions(Boost::process INTERFACE
"BOOST_PROCESS_HAVE_V2")
+ set(BOOST_PROCESS_HAVE_V2 TRUE)
else()
# Boost < 1.86
add_library(Boost::process INTERFACE IMPORTED)
@@ -1329,6 +1331,7 @@ if(ARROW_USE_BOOST)
endif()
if(Boost_VERSION VERSION_GREATER_EQUAL 1.80)
target_compile_definitions(Boost::process INTERFACE
"BOOST_PROCESS_HAVE_V2")
+ set(BOOST_PROCESS_HAVE_V2 TRUE)
# 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.
@@ -1341,6 +1344,20 @@ if(ARROW_USE_BOOST)
endif()
endif()
endif()
+ if(BOOST_PROCESS_HAVE_V2
+ AND # 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
+ (NOT WIN32)
+ AND # We can't use v2 API with musl libc with Boost Process < 1.86
+ # because Boost Process < 1.86 doesn't support musl libc[3].
+ #
+ # [3]
https://github.com/boostorg/process/commit/aea22dbf6be1695ceb42367590b6ca34d9433500
+ (NOT (ARROW_WITH_MUSL AND (Boost_VERSION VERSION_LESS 1.86))))
+ target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_USE_V2")
+ endif()
message(STATUS "Boost include dir: ${Boost_INCLUDE_DIRS}")
endif()
diff --git a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
index 8da8c760ea..c36fbf77ea 100644
--- a/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
+++ b/cpp/src/arrow/compute/kernels/scalar_temporal_test.cc
@@ -2154,13 +2154,23 @@ TEST_F(ScalarTemporalTest, StrftimeOtherLocale) {
auto options = StrftimeOptions("%d %B %Y %H:%M:%S", "fr_FR.UTF-8");
const char* milliseconds = R"(
["1970-01-01T00:00:59.123", "2021-08-18T15:11:50.456", null])";
+#ifdef ARROW_WITH_MUSL
+ // musl-locales uses Capital case for month name.
+ // musl doesn't use "," for milliseconds separator.
+ const char* expected = R"(
+ ["01 Janvier 1970 00:00:59.123", "18 Août 2021 15:11:50.456", null])";
+#else
const char* expected = R"(
["01 janvier 1970 00:00:59,123", "18 août 2021 15:11:50,456", null])";
+#endif
CheckScalarUnary("strftime", timestamp(TimeUnit::MILLI, "UTC"),
milliseconds, utf8(),
expected, &options);
}
TEST_F(ScalarTemporalTest, StrftimeInvalidLocale) {
+#ifdef ARROW_WITH_MUSL
+ GTEST_SKIP() << "musl doesn't report an error for invalid locale";
+#endif
#ifdef __EMSCRIPTEN__
GTEST_SKIP() << "Emscripten doesn't build with multiple locales as default";
#endif
diff --git a/cpp/src/arrow/testing/process.cc b/cpp/src/arrow/testing/process.cc
index 57df0196c1..5f04b31aa1 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 <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
diff --git a/docker-compose.yml b/docker-compose.yml
index e1787680c3..bd91209563 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -217,7 +217,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: