Add Alpine musl support with a custom Go toolchain - #465
Closed
teta2k wants to merge 2 commits into
Closed
Conversation
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.
Summary
dlopenThis is a replacement for #400, rebuilt from current
main.Custom Go toolchain
The Alpine build temporarily depends on an unmerged Go runtime and linker change for loading C-shared libraries on musl. The builder pins the exact reviewed source commit instead of following a mutable branch. This should remain a draft while we review the risk of shipping an unmerged toolchain and collect CI evidence for both architectures.
The custom toolchain uses a weak reference to glibc's
gnu_get_libc_versionfor runtime libc detection. In an ordinary cgo test executable, Go's default linker emits that reference asGLOBAL UND, so musl refuses to start the binary withgnu_get_libc_version: symbol not found. External linking preserves it asWEAK UND, as intended. The Alpine build therefore uses the custom compiler throughout and explicitly selects external linking for tests and shipped Go artifacts.Local validation
sh -non Alpine 3.22dlopensmoke test under muslThe arm64 build, full PHP NTS/ZTS matrix, APK build, and APK install/remove checks are delegated to this draft's CI.