File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ RUN apk add --no-cache \
4141# We will be able to use the main repo once we move to alpine 3.22 or later.
4242RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community mono
4343
44+ # The GNU ld 2.44 shipped in the Alpine 3.22 base image miscompiles the
45+ # statically linked Protobuf descriptor tables on x86_64, which makes
46+ # "import pyarrow" abort at startup with:
47+ # Invalid file descriptor data passed to EncodedDescriptorDatabase::Add()
48+ # Link with mold to work around it. mold is only installed (and therefore
49+ # only used) on x86_64; arm64 is unaffected and falls back to the default
50+ # linker when ARROW_USE_MOLD is set but mold isn't found.
51+ ENV ARROW_USE_MOLD=ON
52+ RUN if [ "${arch}" = "amd64" ]; then apk add --no-cache mold; fi
53+
4454# A system Python is required for ninja and vcpkg in this Dockerfile.
4555# On musllinux_1_2 a system python is installed (3.12) but pip is not
4656# We therefore override the PATH with Python 3.10 in /opt/python
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
6868: ${ARROW_SUBSTRAIT:= ON}
6969: ${ARROW_S3:= ON}
7070: ${ARROW_TENSORFLOW:= ON}
71+ : ${ARROW_USE_MOLD:= OFF}
7172: ${ARROW_WITH_BROTLI:= ON}
7273: ${ARROW_WITH_BZ2:= ON}
7374: ${ARROW_WITH_LZ4:= ON}
@@ -128,6 +129,7 @@ cmake \
128129 -DARROW_SUBSTRAIT=${ARROW_SUBSTRAIT} \
129130 -DARROW_TENSORFLOW=${ARROW_TENSORFLOW} \
130131 -DARROW_USE_CCACHE=ON \
132+ -DARROW_USE_MOLD=${ARROW_USE_MOLD} \
131133 -DARROW_WITH_BROTLI=${ARROW_WITH_BROTLI} \
132134 -DARROW_WITH_BZ2=${ARROW_WITH_BZ2} \
133135 -DARROW_WITH_LZ4=${ARROW_WITH_LZ4} \
You can’t perform that action at this time.
0 commit comments