From b6cd86d7c9df2555e9b2660bb21d12b699684ff3 Mon Sep 17 00:00:00 2001 From: Tadeja Kadunc Date: Mon, 25 May 2026 13:19:55 +0200 Subject: [PATCH 1/4] Workaround mold 2.30.0 _dl_relocate_object crash --- compose.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compose.yaml b/compose.yaml index f527a835a3b..f1f1f341c26 100644 --- a/compose.yaml +++ b/compose.yaml @@ -516,9 +516,16 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" + # GH-49767: workaround for buggy apt mold 2.30.0 + # see https://github.com/rui314/mold/issues/1247 + MOLD_URL: "https://github.com/rui314/mold/releases/download/v2.31.0/mold-2.31.0-x86_64-linux.tar.gz" # Register ODBC before running tests command: > /bin/bash -c " + curl -fsSL $$MOLD_URL -o /tmp/mold.tgz && + tar -C /tmp -xzf /tmp/mold.tgz && + sudo install -m 0755 /tmp/mold-*/bin/ld.mold /usr/local/bin/ && + export PATH=/usr/local/bin:$$PATH && /arrow/ci/scripts/cpp_build.sh /arrow /build && sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && /arrow/ci/scripts/cpp_test.sh /arrow /build" From e6cd1a65a72af06b676d7f11d4c01b931223761d Mon Sep 17 00:00:00 2001 From: Tadeja Kadunc Date: Mon, 25 May 2026 18:14:07 +0200 Subject: [PATCH 2/4] Change to apt mold .deb install --- compose.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/compose.yaml b/compose.yaml index f1f1f341c26..9857de28f4e 100644 --- a/compose.yaml +++ b/compose.yaml @@ -518,14 +518,13 @@ services: ARROW_SUBSTRAIT: "OFF" # GH-49767: workaround for buggy apt mold 2.30.0 # see https://github.com/rui314/mold/issues/1247 - MOLD_URL: "https://github.com/rui314/mold/releases/download/v2.31.0/mold-2.31.0-x86_64-linux.tar.gz" + MOLD_URL: "http://archive.ubuntu.com/ubuntu/pool/universe/m/mold/mold_2.37.1+dfsg-1_amd64.deb" # Register ODBC before running tests command: > /bin/bash -c " - curl -fsSL $$MOLD_URL -o /tmp/mold.tgz && - tar -C /tmp -xzf /tmp/mold.tgz && - sudo install -m 0755 /tmp/mold-*/bin/ld.mold /usr/local/bin/ && - export PATH=/usr/local/bin:$$PATH && + curl -fsSL $$MOLD_URL -o /tmp/mold.deb && + sudo apt-get update && + sudo apt-get install -y /tmp/mold.deb && /arrow/ci/scripts/cpp_build.sh /arrow /build && sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && /arrow/ci/scripts/cpp_test.sh /arrow /build" From c2db4fac285e895ee240b9d59ad5883b6dfcdf3e Mon Sep 17 00:00:00 2001 From: Tadeja Kadunc Date: Mon, 25 May 2026 19:30:16 +0200 Subject: [PATCH 3/4] Newer mold version --- compose.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compose.yaml b/compose.yaml index 9857de28f4e..27cd607e6c8 100644 --- a/compose.yaml +++ b/compose.yaml @@ -516,15 +516,17 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" - # GH-49767: workaround for buggy apt mold 2.30.0 + # GH-49767: Ubuntu 24.04 apt mold predates the fix for rui314/mold#1247 + # (fixed in mold 2.31.0). Remove this if apt ships mold >= 2.31.0. # see https://github.com/rui314/mold/issues/1247 - MOLD_URL: "http://archive.ubuntu.com/ubuntu/pool/universe/m/mold/mold_2.37.1+dfsg-1_amd64.deb" + MOLD_URL: "https://archive.ubuntu.com/ubuntu/pool/universe/m/mold/mold_2.37.1+dfsg-1_amd64.deb" # Register ODBC before running tests command: > /bin/bash -c " curl -fsSL $$MOLD_URL -o /tmp/mold.deb && sudo apt-get update && sudo apt-get install -y /tmp/mold.deb && + ld.mold --version && /arrow/ci/scripts/cpp_build.sh /arrow /build && sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && /arrow/ci/scripts/cpp_test.sh /arrow /build" From c7db0031114e5a50a5ad75313f9db4752d86991b Mon Sep 17 00:00:00 2001 From: Tadeja Kadunc Date: Tue, 26 May 2026 14:26:16 +0200 Subject: [PATCH 4/4] Disable mold on Ubuntu 24.04 --- ci/docker/ubuntu-24.04-cpp.dockerfile | 7 ++++++- compose.yaml | 8 -------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ci/docker/ubuntu-24.04-cpp.dockerfile b/ci/docker/ubuntu-24.04-cpp.dockerfile index 074301b472d..3a98491ba8c 100644 --- a/ci/docker/ubuntu-24.04-cpp.dockerfile +++ b/ci/docker/ubuntu-24.04-cpp.dockerfile @@ -176,6 +176,11 @@ RUN /arrow/ci/scripts/install_sccache.sh unknown-linux-musl /usr/local/bin # provided by the distribution: # - Abseil is old and we require a version that has CRC32C # - opentelemetry-cpp-dev is not packaged +# +# Ubuntu 24.04 apt mold is 2.30.0 which has a non-determinism bug in section placement: +# https://github.com/rui314/mold/issues/1247 fixed in mold 2.31.0. +# See https://github.com/apache/arrow/issues/49767 +# Re-enable ARROW_USE_MOLD if 2.31+ is released for apt Ubuntu 24.04. ENV absl_SOURCE=BUNDLED \ ARROW_ACERO=ON \ ARROW_AZURE=ON \ @@ -197,7 +202,7 @@ ENV absl_SOURCE=BUNDLED \ ARROW_SUBSTRAIT=ON \ ARROW_USE_ASAN=OFF \ ARROW_USE_CCACHE=ON \ - ARROW_USE_MOLD=ON \ + ARROW_USE_MOLD=OFF \ ARROW_USE_UBSAN=OFF \ ARROW_WITH_BROTLI=ON \ ARROW_WITH_BZ2=ON \ diff --git a/compose.yaml b/compose.yaml index 27cd607e6c8..f527a835a3b 100644 --- a/compose.yaml +++ b/compose.yaml @@ -516,17 +516,9 @@ services: ARROW_PARQUET: "OFF" ARROW_S3: "OFF" ARROW_SUBSTRAIT: "OFF" - # GH-49767: Ubuntu 24.04 apt mold predates the fix for rui314/mold#1247 - # (fixed in mold 2.31.0). Remove this if apt ships mold >= 2.31.0. - # see https://github.com/rui314/mold/issues/1247 - MOLD_URL: "https://archive.ubuntu.com/ubuntu/pool/universe/m/mold/mold_2.37.1+dfsg-1_amd64.deb" # Register ODBC before running tests command: > /bin/bash -c " - curl -fsSL $$MOLD_URL -o /tmp/mold.deb && - sudo apt-get update && - sudo apt-get install -y /tmp/mold.deb && - ld.mold --version && /arrow/ci/scripts/cpp_build.sh /arrow /build && sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so && /arrow/ci/scripts/cpp_test.sh /arrow /build"