Repository navigation
GH-1415: Build bundled lz4 in the macOS JNI build - #1416
Merged
Merged
Conversation
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
requested review from
kou,
laurentgo,
lidavidm and
wgtmac
as code owners
October 31, 2026 05:27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
JNI macos-15 aarch_64job in the RC workflow fails onmainwithUnexpected shared dependency found in arrow_dataset_jni/aarch_64/libarrow_dataset_jni.dylib: liblz4. Homebrew'slz4now installs a CMake package configuration whoseLZ4::lz4target is the shared library. Arrow C++'sFindlz4Alt.cmakeuses that target as is, ignoringARROW_LZ4_USE_SHARED=OFF, so on the newermacos-15-arm64runner 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=BUNDLEDinjni_macos_build.sh, like abseil, simdjson and uriparser. The bundled lz4 goes intolibarrow_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_64check 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.