From 0d3549546cf8bfc03870603288c7112efe8179c9 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Thu, 10 Sep 2026 20:29:35 +0800 Subject: [PATCH 1/2] test(examples): the GL members pin the glfw that carries the new farm `compat.glfw` took 3.4.0.1 when its pin on `compat.glx-runtime` moved to 2026.09.11, and nothing moved with it: `imgui-window` and `gui-stack` still pinned 3.4, so they resolved the old chain and the bump was inert. A version nobody pins is a version nobody exercises -- these two are the only members that reach the GL farm at all. Both build against compat.glx-runtime@2026.09.11. They are libraries rather than programs, so mcpp's dlopen-surface check does not apply to them and says so; the farm's own closure is asserted structurally, by reading each member's DT_NEEDED against the farm alone. Measured on this host: the farm is 86 members with no unmet soname and no entry taken directly from /usr/lib -- four route through xim:nvidia-gl-host-link, twenty-eight through other xim payloads, the rest through the subos view. A probe that dlopens every member opens all 86; that probe cannot isolate the farm from the subos, which a control confirmed, so it is evidence that the members load and not that the farm alone suffices. --- tests/examples/gui-stack/mcpp.toml | 2 +- tests/examples/imgui-window/mcpp.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/examples/gui-stack/mcpp.toml b/tests/examples/gui-stack/mcpp.toml index fb4aba12..69ef8b98 100644 --- a/tests/examples/gui-stack/mcpp.toml +++ b/tests/examples/gui-stack/mcpp.toml @@ -7,7 +7,7 @@ name = "gui-stack-tests" version = "0.1.0" [target.'cfg(linux)'.dependencies.compat] -glfw = "3.4" +glfw = "3.4.0.1" x11 = "1.8.13" xcb = "1.17.0" xext = "1.3.7" diff --git a/tests/examples/imgui-window/mcpp.toml b/tests/examples/imgui-window/mcpp.toml index 6878de3a..0a804ce9 100644 --- a/tests/examples/imgui-window/mcpp.toml +++ b/tests/examples/imgui-window/mcpp.toml @@ -7,6 +7,6 @@ version = "0.1.0" [target.'cfg(linux)'.dependencies.compat] imgui = "1.92.8" -glfw = "3.4" +glfw = "3.4.0.1" [target.'cfg(linux)'.build] ldflags = ["-ldl"] From 0d3011413941a3e4bb8c8aa1d3016ae0791e849b Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Thu, 10 Sep 2026 20:40:49 +0800 Subject: [PATCH 2/2] fix(compat.glfw): the source tree is named by upstream's tag, not by this package's version `install()` fell back to `"glfw-" .. pkginfo.version()`. That was the same string for as long as the package had one version; the day it took an ecosystem segment -- 3.4.0.1, for a pin that moved while upstream did not release -- the expression asked for `glfw-3.4.0.1/`, which no tarball contains. install() then moved nothing, and the failure appeared two layers away as `GLFW/glfw3.h: file not found` in a consumer's test. A path derived from a version breaks the first time the version means something the upstream tag does not. The fallback now names the tag, and a source tree that is missing under both spellings is an error rather than an install that "succeeds" and leaves a directory with no headers in it. Found by CI, not locally: `mcpp build` does not compile a member's tests, so the local check was weaker than the one that caught it. --- pkgs/c/compat.glfw.lua | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/c/compat.glfw.lua b/pkgs/c/compat.glfw.lua index 85f234f2..2b4a8362 100644 --- a/pkgs/c/compat.glfw.lua +++ b/pkgs/c/compat.glfw.lua @@ -168,10 +168,35 @@ package = { import("xim.libxpkg.pkginfo") +-- THE SOURCE TREE IS NAMED BY UPSTREAM'S TAG, NOT BY THIS PACKAGE'S VERSION. +-- +-- They were the same string for as long as this package had one version, and +-- the fallback below spelled the directory as `"glfw-" .. pkginfo.version()`. +-- The day the package took an ecosystem segment -- 3.4.0.1, for a pin that +-- moved while upstream did not release -- that expression asked for +-- `glfw-3.4.0.1/`, which no tarball contains. install() then moved nothing and +-- the failure appeared two layers away, as `GLFW/glfw3.h: file not found` in a +-- consumer's test. +-- +-- A path derived from a version is a path that breaks the first time the +-- version means something the upstream tag does not. +local UPSTREAM_TAG = "3.4" + +import("xim.libxpkg.log") + function install() local srcdir = pkginfo.install_file():replace(".tar.gz", "") if not os.isdir(srcdir) then - srcdir = "glfw-" .. pkginfo.version() + srcdir = "glfw-" .. UPSTREAM_TAG + end + if not os.isdir(srcdir) then + -- Loud, because the alternative is an install that "succeeds" and + -- leaves an install_dir with no headers in it. + log.error("compat.glfw: no source tree at %s; the tarball's top-level " + .. "directory is named by upstream's tag (%s), and neither " + .. "that nor the downloaded name matched", + srcdir, UPSTREAM_TAG) + return false end os.tryrm(pkginfo.install_dir())