{"record":{"id":"d36683f9707e984f","repo":"Hmbown/CodeWhale","slug":"update","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":1728,"sourceCode":"}\n\nfn preflight_downloaded_binary(asset_name: &str, bytes: &[u8]) -> Result<()> {\n    // GNU libc preflight is Linux-only (#4241). Rust treats `target_os = \"android\"`\n    // as distinct from `\"linux\"`, so Termux/Android builds skip this check entirely\n    // — Android uses Bionic libc, not glibc.\n    if !cfg!(target_os = \"linux\") || glibc_check_disabled() {\n        return Ok(());\n    }\n\n    let Some(required) = highest_required_glibc(bytes) else {\n        return Ok(());\n    };\n    let host = detect_host_glibc();\n    if host.is_some_and(|host| host >= required) {\n        return Ok(());\n    }\n\n    bail!(\n        \"{}\",\n        glibc_compatibility_message(asset_name, required, host)\n    );\n}\n\nfn detect_host_glibc() -> Option<GlibcVersion> {\n    let getconf = std::process::Command::new(\"getconf\")\n        .arg(\"GNU_LIBC_VERSION\")\n        .output()\n        .ok()\n        .filter(|output| output.status.success())\n        .and_then(|output| String::from_utf8(output.stdout).ok())\n        .and_then(|output| parse_glibc_version(&output));\n    if getconf.is_some() {\n        return getconf;\n    }\n\n    std::process::Command::new(\"ldd\")","sourceCodeStart":1710,"sourceCodeEnd":1746,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/update.rs#L1710-L1746","documentation":"Thrown before applying an update when the host system's glibc version is older than the minimum the release binary requires. detect_host_glibc() reads the host's glibc version; if it cannot detect one or it is below `required`, the updater aborts with a human-readable compatibility message naming the asset, required version, and detected version.","triggerScenarios":"Running self-update on a Linux system whose glibc (detected via ldd or similar) is below the version required by the staged release asset, or where glibc detection returned None.","commonSituations":"Older LTS distributions (e.g. CentOS 7, Ubuntu 18.04) trying to install a binary built against a newer glibc; musl-based systems (Alpine) where glibc detection fails.","solutions":["Read the message for required vs detected glibc and upgrade the OS/distro to one with sufficient glibc.","Use a build of the CLI targeting older glibc or a musl/static build if available.","Run via a newer container image instead of upgrading the host.","Compile the CLI from source against the local toolchain."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before updating, compare host glibc to the release's requirement\nlet required = GlibcVersion { major: 2, minor: 31 };\nif let Some(host) = detect_host_glibc() {\n    if host < required {\n        eprintln!(\"host glibc {:?} < required {:?}; use a musl/static build or upgrade the OS\", host, required);\n    }\n} else {\n    eprintln!(\"glibc not detected (musl?); choose a matching build\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check `ldd --version` before running self-update on older distros.","Use musl/static builds on Alpine or minimal container images.","Prefer updating inside a current base image rather than on aging hosts.","Pin a CLI version known to work with your distro's glibc."],"tags":["update","glibc","linux","compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}