Skip to content

GH-1415: Build bundled lz4 in the macOS JNI build - #1416

Merged
jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix-macos-jni-lz4
Oct 31, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
jbonofre:fix-macos-jni-lz4

Conversation

@jbonofre

@jbonofre jbonofre commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

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.

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, so on newer macos-15-arm64 runner images the JNI libraries
link liblz4.dylib and fail the shared dependency check. Build lz4 from
source, like abseil, simdjson and uriparser.

Closes apache#1415.
@jbonofre jbonofre added the bug-fix PRs that fix a big. label Oct 31, 2026
@github-actions github-actions Bot added this to the 20.0.0 milestone Oct 31, 2026
@jbonofre
jbonofre merged commit 301dc90 into apache:main Oct 31, 2026
23 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix PRs that fix a big.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix RC CI: JNI macos-15 aarch_64 fails with unexpected shared liblz4 dependency

1 participant