{"record":{"id":"3463fa0856c131cf","repo":"Hmbown/CodeWhale","slug":"prebuilt-codewhale-linux-binaries-require-glibc-preflight","errorCode":null,"errorMessage":"Prebuilt Codewhale Linux binaries require GLIBC_${formatVersion(required)}, but this system has glibc ${formatVersion(host)}, which is too old for that asset.\\n\\nThe Linux x64 release asset is a static (musl) build that runs on any glibc,\\nbut the Linux arm64 asset is a GNU libc build linked against\\nUbuntu 24.04/glibc 2.39, which Ubuntu 22.04 (glibc 2.35) cannot run.\\n\\n${buildFromSourceHint()}\\n\\nSet CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.","messagePattern":"Prebuilt Codewhale Linux binaries require GLIBC_(.+?), but this system has glibc (.+?), which is too old for that asset\\.\\\\n\\\\nThe Linux x64 release asset is a static \\(musl\\) build that runs on any glibc,\\\\nbut the Linux arm64 asset is a GNU libc build linked against\\\\nUbuntu 24\\.04/glibc 2\\.39, which Ubuntu 22\\.04 \\(glibc 2\\.35\\) cannot run\\.\\\\n\\\\n(.+?)\\\\n\\\\nSet CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/preflight-glibc.js","lineNumber":131,"sourceCode":"function preflightGlibc(filePath) {\n  if (!isLinux()) return;\n  if (skipGlibcCheck()) {\n    return;\n  }\n\n  const required = detectBinaryRequiredGlibc(filePath);\n  if (!required) {\n    // Statically linked / musl binary, or no GLIBC_* version dependencies present.\n    return;\n  }\n\n  const host = detectHostGlibc();\n  if (!host) {\n    throw new Error(glibcCompatibilityMessage(required, null));\n  }\n\n  if (compareVersion(host, required) < 0) {\n    throw new Error(glibcCompatibilityMessage(required, host));\n  }\n}\n\nmodule.exports = {\n  preflightGlibc,\n  detectHostGlibc,\n  detectBinaryRequiredGlibc,\n  // exported for tests\n  _internal: {\n    parseVersion,\n    compareVersion,\n    formatVersion,\n    glibcCompatibilityMessage,\n    skipGlibcCheck,\n  },\n};\n","sourceCodeStart":113,"sourceCodeEnd":148,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/npm/codewhale/scripts/preflight-glibc.js#L113-L148","documentation":"preflightGlibc() compares the host's detected glibc version against the minimum required by the prebuilt Linux arm64 asset (built on Ubuntu 24.04 / glibc 2.39). When the host version is older, the installer throws so the binary would not fail later with GLIBC_* not found.","triggerScenarios":"ensureBinary/adoptExistingBinaryIfValid call preflightGlibc on a Linux arm64 host whose detected glibc version is numerically less than the required version (e.g. 2.35 < 2.39).","commonSituations":"Ubuntu 22.04 (glibc 2.35) or Debian 11/12 arm64 machines installing the npm package; older LTS CI runners on arm64.","solutions":["Upgrade the OS to one shipping glibc >= 2.39 (e.g. Ubuntu 24.04)","Use an x64 host/machine where the asset is a static musl build needing no glibc check","Build Codewhale from source for your distro","Set CODEWHALE_SKIP_GLIBC_CHECK=1 only if you know the binary will run"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const { detectHostGlibc } = require(\"./scripts/preflight-glibc.js\");\nconst REQUIRED = [2, 39];\nfunction cmp([a,b],[c,d]){return a!==c?a-c:b-d;}\nconst host = detectHostGlibc();\nif (process.platform === \"linux\" && process.arch === \"arm64\" && (!host || cmp(host, REQUIRED) < 0)) {\n  console.warn(\"glibc too old for arm64 prebuilt; upgrade OS or build from source\");\n}","typeGuard":null,"tryCatchPattern":"try { await ensureBinary(); } catch (e) { if (/which is too old/.test(e.message)) { await buildFromSource(); } else throw e; }","preventionTips":["Pin CI arm64 runners to glibc >= 2.39 distros (Ubuntu 24.04+)","Check ldd --version before installing on arm64","Use x64 hosts where the asset is static musl"],"tags":["glibc","linux","arm64","compatibility"],"backgroundTag":"unsupported-platform","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}