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 4f60019695 GH-50242: [CI][Release] Fix flaky dylib load failure in 
macOS verify-rc build (#50243)
4f60019695 is described below

commit 4f6001969595d9d1b7f6ea164cf8e4e3ad9cf432
Author: tadeja <[email protected]>
AuthorDate: Mon Jun 29 09:22:25 2026 +0200

    GH-50242: [CI][Release] Fix flaky dylib load failure in macOS verify-rc 
build (#50243)
    
    ### Rationale for this change
    The nightly job [Verify release candidate on 
macOS](https://github.com/ursacomputing/crossbow/actions/runs/27960474749/job/82740300712#step:3:1689)
 intermittently aborts the C++ build with `Library not loaded: @ 
rpath/libLLVM.22.1.dylib`).
    Conda's LLVM tools resolve `libLLVM` via `@ loader_path/../lib` and can 
point at the package cache which has no `libLLVM`.  The conda env lib dir is 
not on the loader path.
    The same @ rpath miss seen with three different conda libraries (libLLVM, 
libprotoc, libabsl) through four binaries (llvm-link and llvm-ranlib, 
grpc_cpp_plugin, protoc) and may affect any shared library on osx - 
https://github.com/conda-forge/cmake-feedstock/issues/230.
    
    ### What changes are included in this PR?
    Add `$CONDA_PREFIX/lib` to `DYLD_FALLBACK_LIBRARY_PATH` for the step `cmake 
--build`.
    (Fallback is searched last, so it resolves the `@ rpath` miss without 
overriding system libraries.)
    
    Also drop unneeded empty element from DYLD_LIBRARY_PATH/LD_LIBRARY_PATH 
assignment (trailing `:` when the variable was unset).
    
    ### Are these changes tested?
    Tested by nightly jobs verify-rc-source-*-macos-conda-* : 
[cpp](https://github.com/ursacomputing/crossbow/actions/runs/28116539944/job/83257363676#step:3:919),
 
[integration](https://github.com/ursacomputing/crossbow/actions/runs/28116540139/job/83257364464#step:3:958)
 and 
[python](https://github.com/ursacomputing/crossbow/actions/runs/28116539626/job/83257362478#step:3:919)
 tasks pass.
    
    ### Are there any user-facing changes?
    No.
    * GitHub Issue: #50242
    
    Authored-by: Tadeja Kadunc <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 dev/release/verify-release-candidate.sh | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/dev/release/verify-release-candidate.sh 
b/dev/release/verify-release-candidate.sh
index f4d2800eaf..ae49367ba6 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -519,7 +519,15 @@ test_and_install_cpp() {
     ${ARROW_CMAKE_OPTIONS:-} \
     ${ARROW_SOURCE_DIR}/cpp
   export CMAKE_BUILD_PARALLEL_LEVEL=${CMAKE_BUILD_PARALLEL_LEVEL:-${NPROC}}
-  cmake --build . --target install
+  # On macOS, conda package-cache binaries intermittently fail to load their 
@rpath
+  # dependencies even though the libs are present. Add the env lib dir to the 
fallback
+  # path (searched last, to not override system libs) so they resolve.
+  # See https://github.com/conda-forge/cmake-feedstock/issues/230
+  if [ "$(uname)" = "Darwin" ] && [ "${USE_CONDA}" -gt 0 ] && [ -n 
"${CONDA_PREFIX:-}" ]; then
+    DYLD_FALLBACK_LIBRARY_PATH="${CONDA_PREFIX}/lib" cmake --build . --target 
install
+  else
+    cmake --build . --target install
+  fi
 
   if [ ${TEST_CPP} -gt 0 ]; then
     LD_LIBRARY_PATH=$PWD/release:$LD_LIBRARY_PATH ctest \
@@ -779,10 +787,10 @@ test_source_distribution() {
 
   if [ "$(uname)" == "Darwin" ]; then
     NPROC=$(sysctl -n hw.ncpu)
-    export DYLD_LIBRARY_PATH=$ARROW_HOME/lib:${DYLD_LIBRARY_PATH:-}
+    export 
DYLD_LIBRARY_PATH=$ARROW_HOME/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
   else
     NPROC=$(nproc)
-    export LD_LIBRARY_PATH=$ARROW_HOME/lib:${LD_LIBRARY_PATH:-}
+    export 
LD_LIBRARY_PATH=$ARROW_HOME/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
   fi
 
   pushd $ARROW_SOURCE_DIR

Reply via email to