{"record":{"id":"9949c979bb514126","repo":"Hmbown/CodeWhale","slug":"prebuilt-codewhale-asset-asset-name-requires-g","errorCode":null,"errorMessage":"Prebuilt Codewhale asset `{asset_name}` requires GLIBC_{required}, but {host_line}\n\nOfficial Linux release binaries are GNU libc builds. Ubuntu 22.04 ships glibc\n2.35, so it cannot run a binary that was built against Ubuntu 24.04/glibc 2.39.\n\nInstall from source on this host instead:\n\n  cargo install codewhale-cli --locked\n\nRelease engineering follow-up: build Linux GNU assets against an older glibc\nbaseline, or add a musl/static Linux asset. Set CODEWHALE_SKIP_GLIBC_CHECK=1 to\nbypass this preflight at your own risk.","messagePattern":"Prebuilt Codewhale asset `\\{asset_name\\}` requires GLIBC_\\{required\\}, but \\{host_line\\}\n\nOfficial Linux release binaries are GNU libc builds\\. Ubuntu 22\\.04 ships glibc\n2\\.35, so it cannot run a binary that was built against Ubuntu 24\\.04/glibc 2\\.39\\.\n\nInstall from source on this host instead:\n\n  cargo install codewhale-cli --locked\n\nRelease engineering follow-up: build Linux GNU assets against an older glibc\nbaseline, or add a musl/static Linux asset\\. Set CODEWHALE_SKIP_GLIBC_CHECK=1 to\nbypass this preflight at your own risk\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":1653,"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":1635,"sourceCodeEnd":1671,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/cli/src/update.rs#L1635-L1671","documentation":"Before installing a downloaded prebuilt Linux binary, the updater scans it for the highest required GLIBC_x.y symbol version and compares it to the host's glibc (detected via `getconf GNU_LIBC_VERSION`). If the host glibc is older than the binary requires, the install is refused with a message naming the asset, the required version, and the host line, because the binary would crash at startup with 'version GLIBC_2.xx not found'.","triggerScenarios":"Running the updater on an older glibc distro (e.g. Ubuntu 22.04 / glibc 2.35, Debian 11) when the release asset was linked against a newer baseline (e.g. Ubuntu 24.04 / glibc 2.39); host detection succeeds and host < required. Not triggered on non-Linux, when glibc_check_disabled() is true, or when no GLIBC_x.y symbols are found (musl/static assets).","commonSituations":"Long-Term-Support distros lagging the build baseline; containers based on older base images; CI runners pinned to old Ubuntu images; self-update on a stable server while release engineering moved to a newer builder.","solutions":["Install from source on this host: `cargo install codewhale-cli --locked` (as the error message instructs)","Upgrade the host to a distribution whose glibc meets or exceeds the required version shown in the message","As a last resort set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass the preflight — the binary will likely still fail at exec with a loader error, at your own risk","If you release your own builds, build Linux GNU assets against an older glibc baseline or add a musl/static asset (the follow-up named in the message)"],"exampleFix":"# before (Ubuntu 22.04, glibc 2.35)\n$ codewhale update\nPrebuilt Codewhale asset `...gnu.tar.gz` requires GLIBC_2.39 ...\n\n# after\n$ cargo install codewhale-cli --locked\n# or: CODEWHALE_SKIP_GLIBC_CHECK=1 codewhale update  # not recommended","handlingStrategy":"fallback","validationCode":"// Pre-check host glibc before offering a prebuilt update:\nlet host = std::process::Command::new(\"getconf\")\n    .arg(\"GNU_LIBC_VERSION\")\n    .output().ok()\n    .filter(|o| o.status.success())\n    .and_then(|o| String::from_utf8(o.stdout).ok());\n// parse \"glibc 2.35\" and compare against the release's required baseline;\n// if host < required, skip the prebuilt path and build from source.","typeGuard":null,"tryCatchPattern":"match install_prebuilt_with_glibc_preflight(bytes, asset).await {\n    Ok(()) => Ok(()),\n    Err(e) if e.to_string().contains(\"requires GLIBC_\") => {\n        // expected on old distros: fall back to source install, do not bypass blindly\n        run_cargo_install_locked().await\n    }\n    Err(e) => Err(e),\n}","preventionTips":["On LTS distros, prefer `cargo install codewhale-cli --locked` over prebuilt updates","Base containers on distros at least as new as the release build baseline","Never set CODEWHALE_SKIP_GLIBC_CHECK=1 in automation; the exec will still fail"],"tags":["update","linux","glibc","binary-compatibility","preflight"],"backgroundTag":"glibc-version-mismatch","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}