Skip to content

Commit 301dc90

Browse files
authored
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.
1 parent 2f35627 commit 301dc90

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎ci/scripts/jni_macos_build.sh‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ cmake \
7474
-B "${build_dir}/cpp" \
7575
--preset=ninja-release-jni-macos \
7676
-Dabsl_SOURCE=BUNDLED \
77+
-Dlz4_SOURCE=BUNDLED \
7778
-Dsimdjson_SOURCE=BUNDLED \
7879
-Duriparser_SOURCE=BUNDLED \
7980
-DCMAKE_INSTALL_PREFIX="${install_dir}"

0 commit comments

Comments
 (0)