Repository navigation
Fix 16 KB alignment of published Android libraries - #7
Merged
Merged
Conversation
GitHub's runners preset ANDROID_NDK_HOME to NDK 27.3, which KonanPlugin prefers over the Android Gradle plugin's NDK, so the published 0.4.0 and 0.4.1 AARs were linked with 4 KB aligned segments despite the NDK 28 install. Both workflows now point ANDROID_NDK_HOME at NDK 28.2, and scripts/check-16kb-alignment.sh fails the build, on every pull request and before publishing, if a 64-bit library is not 16 KB aligned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
The Android libraries in the published 0.4.0 and 0.4.1 AARs are 4 KB aligned (
LOADalign0x1000for arm64-v8a and x86_64), so the 16 KB page fix from #3/#4 never reached Maven Central. Local builds were fine (0x4000), which is why it went unnoticed.The publish log shows why: every Android library was built with
ndk/27.3.13750724. GitHub's macOS (and Ubuntu) runners presetANDROID_NDK_HOMEto that NDK, and KonanPlugin ranksANDROID_NDK_HOMEabove the Android Gradle plugin's NDK, so the NDK 28.2 the workflow installed was never used. NDK 27's linker defaults to 4 KB pages.Fix
ANDROID_NDK_HOMEat it.scripts/check-16kb-alignment.sh <aar>fails unless every 64-bit.sohas 16 KB alignedLOADsegments.Test plan
After merging, a 0.4.2 release fixes the published artifact.
🤖 Generated with Claude Code