fix(linux): enable vendored static deps for portable JNI builds#764
Closed
jamesarich wants to merge 1 commit into
Closed
fix(linux): enable vendored static deps for portable JNI builds#764jamesarich wants to merge 1 commit into
jamesarich wants to merge 1 commit into
Conversation
Enable MLN_LINUX_STATIC_DEPS in linux-base CMake preset to build all C/C++ dependencies from source with -fPIC. This produces a portable libmaplibre-jni.so that only dynamically links against system graphics (X11, OpenGL), networking (libcurl, OpenSSL), and C++ runtime. Updates maplibre-native submodule to include vendored deps support. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
014a3a6 to
0c1ac84
Compare
Author
|
Closing to re-open with corrected changes. The .gitmodules URL change was incorrect — submodule should stay pointing to sargunv/maplibre-native. |
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.
Description
Enable
MLN_LINUX_STATIC_DEPSin the Linux CMake preset and point the maplibre-native submodule to a branch that supports vendoring system dependencies as static libraries.This resolves #627 — Linux JNI artifacts will no longer crash with
UnsatisfiedLinkErroron distros whose system library versions differ from the build environment.Changes
lib/maplibre-native-bindings-jni/CMakePresets.json— Added"MLN_LINUX_STATIC_DEPS": "ON"to thelinux-basepreset.gitmodules— Updated submodule URL to fork with vendoring supportUpstream dependency
This PR depends on the maplibre-native changes in sargunv/maplibre-native#2. Once merged upstream, the submodule URL and pointer should be updated to point to the upstream repo.
Test plan
Desktop (Linux, Ubuntu 25.04):
./gradlew :lib:maplibre-native-bindings-jni:buildNativesucceeds.sohas no dynamic dependencies on vendored libraries.soexportsOther platforms:
Breaking changes
None. This only affects the Linux native build process, not the public API.