Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Branch Name
main
Commit ID
6a2b29954749d5a47820ed429cfa8a6c4793682f
Other Environment Information
macOS/arm64, Go 1.27.1, native CPU build, system GNU Make. Clean isolated Git worktree. Discovered while preparing QA for #32369 and #32078.
Actual Behavior
A standard Make command-line variable assignment can cause cgo-native-prepare-internal to return successfully before provenance preparation or begin. Third-party libraries and libmo are built, but the final record fails with native build completion marker is missing or invalid.
Observed with make build ONNX_PREBUILT_DIR=<verified-local-onnx-library-directory>. The first invocation spent time building native libraries and exited nonzero. The worktree contained no provenance pending/building marker afterward. Exporting the same variable in the environment and running plain make build completed successfully.
Expected Behavior
Make variable overrides should preserve the provenance prepare/build/record sequence. Only real dry-run, touch or question flags should suppress its mutating preparation.
Steps to Reproduce
Use a fresh worktree and a checksum-matching ONNX library directory for the platform.
make build ONNX_PREBUILT_DIR=/path/to/verified/onnx/library/directoryA minimal reproduction of the guard classification requires no native build. Put the following in a temporary Makefile and pass a command-line variable assignment.
all:
@echo 'MAKEFLAGS=[$(MAKEFLAGS)] first=[$(firstword $(MAKEFLAGS))]'
@case "$(firstword $(MAKEFLAGS))" in -*) echo CONTINUE ;; *n*|*t*|*q*) echo SKIPPED_PREPARE ;; *) echo CONTINUE ;; esacmake -f /tmp/guard.mk ONNX_PREBUILT_DIR=/tmp/cache
make -f /tmp/guard.mkThe first prints MAKEFLAGS=[ONNX_PREBUILT_DIR=/tmp/cache] and SKIPPED_PREPARE. Plain make prints CONTINUE.
Additional information
The first guard in Makefile target cgo-native-prepare-internal checks the first word of MAKEFLAGS with the patterns *n*|*t*|*q*. On this Make implementation, a variable override can be that first word and match those patterns. This is independent of the Group and max-processor fixes. No MatrixOne tracked source was changed during verification.
Searched open and closed issues for MAKEFLAGS and native build completion marker; no matching report was found.
Activity
fix(build): distinguish Make variable assignments from dry-run flags
Fix native preparation and stabilize CI tests (#32574)
XuPeng-SH commentedon Nov 12, 2026
转 QA 验证:修复已随 #32574 合入 main,merge SHA
4760bcaa88b23fabe064b1631b624c0e8c40d549(PR head071380402a525fd6696823a735ccca4537cc63ea)。本 issue 是确定性的 native Make 参数/构建准备缺陷,不按偶发 CI issue 直接关闭。修复移除对 MAKEFLAGS 首词的错误解析,由 Make 自身处理 dry-run/touch/question 执行语义,保留 prepare/build/record 顺序。作者报告:Linux GNU Make 3.81/4.4.1 完整生产 target 隔离矩阵通过,含变量赋值、真实选项、递归 Make、清理顺序和失败注入;3.81 相同预构建 native 输入的源码归档控制旧版缺 completion marker、候选成功。4.4.1 另做清理源码重建,使用校验匹配 ONNX 库。Node suite 50 项通过;macOS/arm64 Node22/system Make3.81 的目标回归通过。3.81 rebuild-all 清理完成但有两条 jobserver-unavailable warning,清理子 Make 可串行回退。
本轮未新跑测试;上述证据来自作者,不是最终 merge SHA 的本轮本地实测。macOS 完整 native 构建与 GPU 尚未验证,源码归档产物标记 non-reusable;Linux 3.81 前后对照为增量构建,不能写成干净全重建。请 QA 优先按原 macOS ARM64 命令行 ONNX_PREBUILT_DIR 复现步骤检查 prepare/begin/record 及失败清理,再核对变量值含 n/t/q、递归 Make 与真实 -n/-t/-q 不产生错误副作用。无当前适用反例或未完成开发 follow-up,交给 Ariznawlll,保持开放,等待 QA 验证。
Ariznawlll commentedon Nov 12, 2026
测试结论
通过:在 macOS/arm64 上使用原始的命令行变量覆盖方式执行完整
make build,构建成功,不再出现 native build completion marker 缺失错误。测试版本与环境
main。b9c06b27b0d7384ca31ce67edd43f764152d56d2。黑盒测试(Happy / Unhappy)
CI 43212255493 整个作业成功:
30afadcfc3c704f7671f8430d6252956651c1972373901d2be629da2e6a4d8ee;再执行原始形态/usr/bin/make build ONNX_PREBUILT_DIR=<已校验目录>。日志确认经过 native 清理/准备、使用指定预构建 ONNX、生成二进制,命令成功退出且mo-service可执行文件存在。-n/--touch字样的变量值、正常并行/其他参数,以及真实 dry-run、touch、question 模式不执行准备;同时验证 clean 顺序及注入清理错误后的停止行为。白盒与回归
修复后的准备目标不再将
MAKEFLAGS首个变量赋值误判为 dry-run,而是交由 Make 自身区分实际执行模式;上述测试直接运行产品仓库的目标和参数回归。修复 PR 已将 Make 参数回归接入现有 macOS native-contract CI;本次完整 macOS 构建验收工作流也提交至 MOTR PR #329。本次验证的是原报告的 macOS CPU 构建和参数边界,不涉及 GPU 构建或生产部署。按原问题范围验收通过并关闭。