{"record":{"id":"9a1d131a9743ed45","repo":"jdx/mise","slug":"the-packslip-lists-a-and-b-as-musl-fallbacks-for-and-mise","errorCode":null,"errorMessage":"the packslip lists {a} and {b} as musl fallbacks for {}, and mise will not guess between them","messagePattern":"the packslip lists (.+?) and (.+?) as musl fallbacks for (.+?), and mise will not guess between them","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/packslip.rs","lineNumber":457,"sourceCode":"    min: &str,\n) -> Result<&'a Artifact> {\n    if crate::packslip_requirements::meets_minimum(actual, min) != Some(false) {\n        return Ok(artifact);\n    }\n\n    let musl = Host {\n        libc: Some(\"musl\"),\n        ..host.as_host()\n    };\n    match packslip::select_artifact(artifacts, &musl, variant, &FORMAT_PREFERENCE) {\n        Ok(fallback) => {\n            debug!(\n                \"{} requires glibc>={min}, but this host has {actual}; taking the static musl build {}\",\n                artifact.name, fallback.name\n            );\n            Ok(fallback)\n        }\n        Err(Selection::Ambiguous(a, b)) => bail!(\n            \"the packslip lists {a} and {b} as musl fallbacks for {}, and mise will not guess between them\",\n            artifact.name\n        ),\n        Err(Selection::NoMatch) => Ok(artifact),\n    }\n}\n\n/// The artifact installed from a stored statement, for scoping resources to it\n/// later. New installs record it explicitly; old installs fall back to host\n/// selection. `None` means only unscoped resources apply.\npub(crate) fn selected_artifact(\n    statement: &Statement,\n    install_path: &Path,\n    variant: Option<&str>,\n) -> Option<Artifact> {\n    if let Ok(name) = std::fs::read_to_string(install_path.join(SELECTED_ARTIFACT_FILE))\n        && let Some(artifact) = statement\n            .predicate","sourceCodeStart":439,"sourceCodeEnd":475,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/packslip.rs#L439-L475","documentation":"When the selected gnu artifact declares a minimum glibc version higher than the host's, mise falls back to a static musl build. If two musl artifacts match the host equally as fallbacks, mise refuses to guess and raises this error naming both artifacts and the gnu artifact that needed the fallback.","triggerScenarios":"Installing a packslip tool on a glibc host whose glibc is older than the artifact's requires.glibc_min, while the packslip lists two musl artifacts for the same os/arch with equal format preference.","commonSituations":"Running on an older enterprise Linux (old glibc) with a tool whose latest release requires newer glibc; the vendor publishes two musl builds (e.g. two archive formats) without variants.","solutions":["Set the `variant` tool option to pick one of the musl artifacts explicitly.","Pin an older tool version whose glibc requirement fits the host or whose musl fallback is unambiguous.","Upgrade the host glibc (or use a newer distro/container) so the gnu artifact's requirement is met and no fallback is needed.","Ask the vendor to disambiguate the duplicate musl artifacts in the packslip."],"exampleFix":"// before\n[tools]\n\"packslip:foo\" = \"latest\"\n\n// after\n[tools]\n\"packslip:foo\" = { version = \"latest\", variant = \"tar-gz\" }","handlingStrategy":"fallback","validationCode":"// Check glibc version against the artifact requirement before install.\nconst glibc = await getGlibcVersion();\nif (artifact.requires?.glibc_min && compareGlibc(glibc, artifact.requires.glibc_min) < 0) {\n  console.warn('host glibc below minimum; a musl fallback artifact will be selected');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await miseInstall(tool);\n} catch (e) {\n  if (String(e).includes('as musl fallbacks')) {\n    await miseInstall(tool, { variant: 'tar-gz' }); // explicit disambiguation\n  } else throw e;\n}","preventionTips":["Know your host's glibc version and pick tool versions whose glibc_min fits it.","Set an explicit variant when the vendor ships multiple musl artifacts.","Use distro images with glibc new enough to avoid fallback entirely.","Pin versions in mise.lock so fallback behavior is stable."],"tags":["packslip","glibc","musl-fallback","artifact-selection"],"backgroundTag":"ambiguous-candidate-match","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}