jdx/mise · error · eyre::Report
Linux release targets require a detected libc family
Error message
Linux release targets require a detected libc family
What it means
Defensive invariant in release_asset_name: a Linux target was passed with libc None. Linux asset names must encode the libc family (linux-{arch} for glibc, linux-{arch}-musl for musl), so an unidentified family cannot produce a valid asset name. Today parse_remote_platform already bails with 'remote Linux libc family could not be identified' before libc can be None for Linux, and official_release_assets always passes Some(libc), so this arm guards future internal callers only.
Source
Thrown at src/system/remote.rs:1100
"armv7" => "armv7",
_ => {
bail!(
"mise {} has no official precompiled artifact for {os}/{arch}; set mise_bin, remote_mise, or bootstrap_command",
env!("CARGO_PKG_VERSION")
)
}
};
let suffix = match os {
"macos" if matches!(arch, "x86_64" | "aarch64") => {
if libc.is_some() {
bail!("macOS release targets cannot declare a libc family");
}
format!("macos-{release_arch}")
}
"linux" if matches!(arch, "x86_64" | "aarch64" | "armv7") => match libc {
Some(LibcFlavor::Glibc) => format!("linux-{release_arch}"),
Some(LibcFlavor::Musl) => format!("linux-{release_arch}-musl"),
None => bail!("Linux release targets require a detected libc family"),
},
_ => {
bail!(
"mise {} has no official precompiled artifact for {os}/{arch}; set mise_bin, remote_mise, or bootstrap_command",
env!("CARGO_PKG_VERSION")
)
}
};
Ok(format!("mise-v{}-{suffix}", env!("CARGO_PKG_VERSION")))
}
fn official_release_assets(os: &str, arch: &str) -> Result<Vec<String>> {
match os {
"linux" => [LibcFlavor::Glibc, LibcFlavor::Musl]
.into_iter()
.map(|libc| release_asset_name(os, arch, Some(libc)))
.collect(),
"macos" => Ok(vec![release_asset_name(os, arch, None)?]),View on GitHub (pinned to 6f52dcdf99)
Solutions
- Run libc detection first (remote_platform_script via detect_remote_platform) and pass Some(glibc|musl) for Linux
- If declaring a platform manually, resolve libc via ldd --version / getconf GNU_LIBC_VERSION / ld-musl loader presence, mirroring remote_platform_script
Example fix
// before
let platform = RemotePlatform { os: "linux".into(), arch: "x86_64".into(), libc: None };
let asset = platform.release_asset_name()?;
// after
let platform = detect_remote_platform(&session)?; // libc detected as Some(Glibc|Musl)
let asset = platform.release_asset_name()?; Defensive patterns
Strategy: validation
Validate before calling
// Guard at the call site: linux requires a detected libc family
if platform.os == "linux" && platform.libc.is_none() {
eyre::bail!("run detect_remote_platform first: linux needs libc detection");
}
let asset = platform.release_asset_name()?; Type guard
fn valid_asset_request(os: &str, arch: &str, libc: Option<LibcFlavor>) -> bool {
match normalize_os(os).as_str() {
"linux" => libc.is_some() && matches!(normalize_arch(arch).as_str(), "x86_64" | "aarch64" | "armv7"),
"macos" => libc.is_none() && matches!(normalize_arch(arch).as_str(), "x86_64" | "aarch64"),
_ => false,
}
} Prevention
- Never hand-construct a Linux RemotePlatform without libc
- Route all platform acquisition through detect_remote_platform
- Add a debug_assert!(os != "linux" || libc.is_some()) next to platform-producing code
When it happens
Trigger: A Rust change constructs a Linux RemotePlatform without running libc detection, or calls release_asset_name("linux", arch, None) directly (e.g. new code path that skips detect_remote_platform).
Common situations: Adding a new platform source (config-declared platform, cached platform) that forgets the libc field; refactors that drop the detection step.
Related errors
- macOS release targets cannot declare a libc family
- remote Linux libc family could not be identified
- precompiled erlang is not supported on musl linux
- firewall port '{range}' must be a number or inclusive range
- firewall port range {start}-{end} is invalid
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/724f0778459e4188.
Report an issue: GitHub.