Repository navigation
Fix musl misdetection on glibc systems with musl installed (#692) - #740
Merged
Merged
Conversation
Checking for /lib/ld-musl-x86_64.so.1 misdetects glibc systems that also have musl installed (e.g., as a dependency of Grafana), where the x86_64-musl native library then fails to load (#692). Inspect /proc/self/maps instead, and only consider musl on Linux x86_64. Also add CI jobs that run the tests on Alpine and on Ubuntu with musl installed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 3, 2026
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
Fixes #692. Since 1.1.10.8,
OSInfopicks thex86_64-muslnative library whenever/lib/ld-musl-x86_64.so.1exists. That file is often present on glibc systems too: it gets installed alongside Grafana or with themusl/musl-toolspackages. On those machines the musl build of the library then fails withlibc.musl-x86_64.so.1: cannot open shared object file. Reported users include Confluence (CONFSERVER-100761) and Teku.The new check looks for musl's loader in
/proc/self/maps, which shows the C library actually loaded into the running JVM, so having musl installed elsewhere on the system doesn't matter. It also only runs on Linux x86_64; before, the file check ran on every OS and architecture. If/proccan't be read, it falls back to the glibc build, which was the behavior before 1.1.10.8.This is an alternative to #694, which keys off an
IS_MUSLenvironment variable. With this approach, Alpine users keep automatic detection without setting anything.Test plan
isMuslLoadedcovering a musl maps file, a glibc maps file and a missing fileeclipse-temurin:17-jdk-alpinemust detectx86_64-musland pass./sbt testmuslinstalled must detectx86_64and pass./sbt test🤖 Generated with Claude Code