You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
22:29:18.92 error: NASM sources (.asm) present but no usable nasm (>= 2.16) was found or installable; install one via `xlings install nasm` or your system package manager
22:29:19.16 Bootstrap nasm into mcpp sandbox (one-time)
nasm.lua (from xim-pkgindex#395) declared its resources with the new xpm.source = "xlings-res" + per-arch sha256 table form. Deployed xlings engines parse neither the source key nor a table-valued sha256 — the resolved resource ends up with no URL, so no download is ever planned. Reproduced with the xlings vendored in mcpp 0.0.95 (fresh XLINGS_HOME, verbose): no Download/Extract phase, runtimedir/ empty, then:
install hook runs: os.mv("nasm-3.02", install_dir()) — source dir doesn't exist, no-ops; hook still return true
xlings auto-stamps .xim-installed into the empty dir → "1 package(s) installed ✓"
config() registers xvm shims pointing at nothing → dangling subos/default/bin/nasm
Fix landed (index side): xim-pkgindex#398 switches nasm.lua to the production-proven mcpp.lua idiom — url = "XLINGS_RES" placeholder + arch-keyed sha256 (ignored by old engines, verifiable by new ones) — and hardens install() to be idempotent and to fail loudly when the binary isn't in place instead of returning true over an empty dir. Verified against the vendored 0.0.95 xlings: download happens, nasm --version → 3.02.
Remaining mcpp-side gap (why 0.0.96 is still affected out-of-the-box)
ensure_nasm calls install_with_progress(env, "xim:nasm", ...) directly, with no index-freshness call — and even ensure_official_package_index_fresh wouldn't help here: it is offline-first and returns early when the package file exists locally. The xim-pkgindex snapshot vendored inside the mcpp 0.0.96 release archives predates the fix, so the broken nasm.lua is used as-is until the user happens to run xlings update / mcpp index update.
more robust: when a bootstrap install reports success but the sandbox probe (find_sandbox_nasm) still finds nothing, force one index refresh and retry once — that would have both surfaced and healed this failure mode;
xlings: refuse to auto-stamp .xim-installed over an install whose hook moved nothing and whose download plan was empty (a package with programs declared but an empty install dir is almost certainly a failure, not a wrapper package).
CI note: mcpp-index keeps its apt-get install nasm step until a mcpp release ships with the fixed vendored snapshot.
Activity
Sunrisepeak commentedon Jul 17, 2026
补充:本地复现把根因往下挖了一层 —— 不是时序问题,是
xim:nasm安装本身产出空载荷。ensure_nasm(src/xlings.cppm)是严格同步的:PATH 探测 → 阻塞式install_with_progress(env, "xim:nasm")→ 重新find_sandbox_nasm→ 全空才报错。日志里 error 先于 "Bootstrap nasm" 出现只是 ui 缓冲交错(status 走缓冲通道、error 直写),不存在"先判死后补装"的竞态。真正的断点(本地 100% 复现,linux x86_64):
之后:
data/xpkgs/xim-x-nasm/3.02/只有.xim-installed+.xpkg.lua,没有 nasm/ndisasm 二进制;subos/default/bin/nasmshim 已创建但悬空(nasm -v无输出);find_sandbox_nasm探测<ver>/nasm、<ver>/bin/nasm找不到是正确行为 —— 载荷根本不存在。嫌疑机制:xim-pkgindex
pkgs/n/nasm.lua的 hook与新版 xlings 安装器的 C++ 侧
stage_extracted_payload_(下载解压后自动把载荷搬进 install_dir)叠加:C++ 先 staged → hook 的os.tryrm把已就位的载荷删掉 → cwd(runtimedir)里nasm-3.02已被搬走,os.mv落空 → 仍返回 true → xlings 标记安装成功并建 shim。建议修复方向(择一或并行):
ensure_nasm:find_sandbox_nasm复查失败时把xlings install的输出转发出来,别只留一句 "not installable"。另:CI 侧 mcpp-index 已恢复 apt nasm(f2f7e08)作为临时措施,此 issue 修复后即可移除。
fix(nasm): XLINGS_RES placeholder + hardened install hook (mcpp#232) (#…
Sunrisepeak commentedon Jul 18, 2026
Root cause confirmed (supersedes my earlier hook-vs-staging theory)
The empty install is an index-side descriptor bug, now fixed in openxlings/xim-pkgindex#398:
nasm.lua(from xim-pkgindex#395) declared its resources with the newxpm.source = "xlings-res"+ per-archsha256table form. Deployed xlings engines parse neither thesourcekey nor a table-valuedsha256— the resolved resource ends up with no URL, so no download is ever planned. Reproduced with the xlings vendored in mcpp 0.0.95 (freshXLINGS_HOME, verbose): no Download/Extract phase,runtimedir/empty, then:os.mv("nasm-3.02", install_dir())— source dir doesn't exist, no-ops; hook stillreturn true.xim-installedinto the empty dir → "1 package(s) installed ✓"config()registers xvm shims pointing at nothing → danglingsubos/default/bin/nasmFix landed (index side): xim-pkgindex#398 switches nasm.lua to the production-proven mcpp.lua idiom —
url = "XLINGS_RES"placeholder + arch-keyed sha256 (ignored by old engines, verifiable by new ones) — and hardensinstall()to be idempotent and to fail loudly when the binary isn't in place instead of returning true over an empty dir. Verified against the vendored 0.0.95 xlings: download happens,nasm --version→ 3.02.Remaining mcpp-side gap (why 0.0.96 is still affected out-of-the-box)
ensure_nasmcallsinstall_with_progress(env, "xim:nasm", ...)directly, with no index-freshness call — and evenensure_official_package_index_freshwouldn't help here: it is offline-first and returns early when the package file exists locally. The xim-pkgindex snapshot vendored inside the mcpp 0.0.96 release archives predates the fix, so the broken nasm.lua is used as-is until the user happens to runxlings update/mcpp index update.Suggestions:
find_sandbox_nasm) still finds nothing, force one index refresh and retry once — that would have both surfaced and healed this failure mode;.xim-installedover an install whose hook moved nothing and whose download plan was empty (a package withprogramsdeclared but an empty install dir is almost certainly a failure, not a wrapper package).CI note: mcpp-index keeps its
apt-get install nasmstep until a mcpp release ships with the fixed vendored snapshot.Sunrisepeak commentedon Jul 18, 2026
✅ 已在 mcpp 0.0.97 修复(PR #236,
482b428,簇 F)。nasm 供给改走工具链同款同步门
Fetcher::resolve_xpkg_path("xim:nasm@3.02", autoInstall=true)(索引刷新前置 + 阻塞安装 + payload 校验 + 硬报错),不再先判死后台补装;get_cfg()的 config 自举错误不再被吞成误导性的 "no usable nasm"。验证:单测(
find_usable_nasm6 例矩阵 + 错误不吞)+ e2e105_asm_sources_nasm.sh冷环境分区。