This is an automated email from the ASF dual-hosted git repository.
kou 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 6399ec9c6a GH-47015: [CI][C++] Use mold on conda-cpp to work around
issues with GNU ld (#47028)
6399ec9c6a is described below
commit 6399ec9c6a79f30ee14d806e6d9851cd9d87f62c
Author: Antoine Pitrou <[email protected]>
AuthorDate: Tue Jul 8 09:42:07 2025 +0200
GH-47015: [CI][C++] Use mold on conda-cpp to work around issues with GNU ld
(#47028)
### Rationale for this change
A particular combination of `gcc`, GNU `ld` and specific compiler flags
leads to crashes when calling `std::call_once` in some compilation units:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60662
The problem disappears when using another linker such `ld.gold` (which has
been removed from GNU binutils) and `mold`.
### What changes are included in this PR?
Use `mold` on conda-based C++ builds.
### Are these changes tested?
By existing CI jobs.
### Are there any user-facing changes?
No.
* GitHub Issue: #47015
Authored-by: Antoine Pitrou <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
ci/docker/conda-cpp.dockerfile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ci/docker/conda-cpp.dockerfile b/ci/docker/conda-cpp.dockerfile
index 7564259e87..a387fb2669 100644
--- a/ci/docker/conda-cpp.dockerfile
+++ b/ci/docker/conda-cpp.dockerfile
@@ -27,6 +27,7 @@ RUN /arrow/ci/scripts/install_minio.sh latest /opt/conda
ARG python=3.10
# install the required conda packages into the test environment
+# use `mold` to work around issues with GNU `ld` (GH-47015).
COPY ci/conda_env_cpp.txt \
ci/conda_env_gandiva.txt \
/arrow/ci/
@@ -36,6 +37,7 @@ RUN mamba install -q -y \
compilers \
doxygen \
libnuma \
+ mold \
python=${python} \
valgrind && \
mamba clean --all --yes
@@ -73,6 +75,7 @@ ENV ARROW_ACERO=ON \
ARROW_S3_MODULE=ON \
ARROW_SUBSTRAIT=ON \
ARROW_USE_CCACHE=ON \
+ ARROW_USE_MOLD=ON \
ARROW_WITH_BROTLI=ON \
ARROW_WITH_BZ2=ON \
ARROW_WITH_LZ4=ON \