mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
Each shared tool is its project's prebuilt release, built against a glibc it needs at least, so a --from gnu base older than that ran the tool into a loader error. Now devvm measures both sides and refuses the tool clearly. - A tool image's build measures the newest GLIBC_ version its ELF programs and libraries need (shared-tools/build.sh's glibc_needs: readelf's version needs, testdata folders left out), writes it to FILE.glibc, and devvm keeps it in the image's record (glibc), taken only as a plain file holding one version (tool_bad_output). - A --from conversion records the image's glibc version (getconf GNU_LIBC_VERSION in a chroot; oci/build.sh's glibc output, checked by checkConverted), in base's record and every image's on it (backend.Built.Glibc, state.Image.Glibc). Ubuntu's own base has none and isn't checked; musl needs none. - tools.Target carries the base's glibc (not hashed: a gnu tool image is the same on every base); a VM's state records it (tools.made.glibc); Launch.buildTools checks every tool with tools.Share.Runs after building, for new VMs and devvm tools add/update and devvm update: tool_needs_glibc names the tool, its version and both glibc versions. - image.ValidGlibc and image.GlibcOlder own the version's shape and order. build.Env.ToolTarget reads base's record once (BaseLibc gone). - Measured minimums, current releases (arm64 / amd64): node 2.28/2.28, pnpm 2.18/2.18, bun 2.17/2.17, python 2.17/2.17, uv 2.28/2.17, rust 2.17/2.17, go none (its 2.34 came from Go's own testdata), claude 2.17/2.17, opencode 2.17/2.17, codex 2.28/2.28 (its voice helper). - Tests: TestGlibc, TestBuildGlibc, TestBuildGlibcRefused, TestRuns, TestGlibcNeeds (build.sh's function against debug/elf, where readelf is), TestToolTargetGlibc, checkConverted's glibc cases; from.txtar: an old base refuses node at launch and at devvm tools add, keeps go, and records 2.24; e2e: the Debian base's record and VM state hold the VM's real glibc, no tool image needs a newer one, and Ubuntu's tool images record a glibc; the stubs write FILE.glibc and glibc. - Docs: using/from.md (Shared tools and glibc), using/toolchains.md (Which bases they run on), internals/images.md, assets/oci/README.md. Every tool image's key changes once (build.sh), so each is built again. Co-Authored-By: Claude Opus 5.5 <[email protected]>