This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-java.git


The following commit(s) were added to refs/heads/main by this push:
     new 301dc9019 GH-1415: Build bundled lz4 in the macOS JNI build (#1416)
301dc9019 is described below

commit 301dc901915ee419a3b889157769ff39fbe52adf
Author: JB Onofré <[email protected]>
AuthorDate: Sat Oct 31 06:57:32 2026 +0000

    GH-1415: Build bundled lz4 in the macOS JNI build (#1416)
    
    The `JNI macos-15 aarch_64` job in the RC workflow fails on `main` with
    `Unexpected shared dependency found in
    arrow_dataset_jni/aarch_64/libarrow_dataset_jni.dylib: liblz4`.
    Homebrew's `lz4` now installs a CMake package configuration whose
    `LZ4::lz4` target is the shared library. Arrow C++'s `Findlz4Alt.cmake`
    uses that target as is, ignoring `ARROW_LZ4_USE_SHARED=OFF`, so on the
    newer `macos-15-arm64` runner image (20261028.0489) the JNI libraries
    are linked with `/opt/homebrew/lib/liblz4.1.10.0.dylib`.
    
    This builds lz4 from source with `-Dlz4_SOURCE=BUNDLED` in
    `jni_macos_build.sh`, like abseil, simdjson and uriparser. The bundled
    lz4 goes into `libarrow_bundled_dependencies.a`, and the bundled ORC
    build uses it too.
    
    Not tested locally because it needs the full Arrow C++ build. The `JNI
    macos-15 aarch_64` check on this PR is the verification. Jobs on the
    older runner image (20260907.0337) pass even without this change, so the
    check is only meaningful if it runs on the newer image.
    
    Closes #1415.
---
 ci/scripts/jni_macos_build.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci/scripts/jni_macos_build.sh b/ci/scripts/jni_macos_build.sh
index 277987aa8..32a1faefb 100755
--- a/ci/scripts/jni_macos_build.sh
+++ b/ci/scripts/jni_macos_build.sh
@@ -74,6 +74,7 @@ cmake \
   -B "${build_dir}/cpp" \
   --preset=ninja-release-jni-macos \
   -Dabsl_SOURCE=BUNDLED \
+  -Dlz4_SOURCE=BUNDLED \
   -Dsimdjson_SOURCE=BUNDLED \
   -Duriparser_SOURCE=BUNDLED \
   -DCMAKE_INSTALL_PREFIX="${install_dir}"

Reply via email to