fix(build): use zigbuild for musl supervisor staging#1850
Conversation
Signed-off-by: Evan Lezar <elezar@nvidia.com>
PR Review StatusValidation: this is maintainer-authored, project-valid build/release work scoped to supervisor binary staging and architecture documentation. Review findings:
Docs: architecture documentation was updated; no Fern docs or navigation changes are needed because this does not change direct user-facing UX. Checks: most required checks are green, but the required gate status re-ran after the gator state update and is currently pending. Next state: |
Maintainer Approval NeededGator validation and PR monitoring are complete. Validation: maintainer-authored build/release fix scoped to supervisor binary staging and architecture documentation. Human maintainer approval or merge decision is now required. |
Re-check After Maintainer UpdateI re-evaluated latest head Disposition: resolved; maintainer approval has been received and no blocking gator review or CI items remain. Remaining items:
Next state: |
|
Label |
Re-check After Pipeline UpdateI re-evaluated latest head Disposition: the prior maintainer-approval handoff is no longer complete because the newly required Remaining items:
Next state: |
Monitoring CompleteMonitoring is complete because this PR has merged. Final status: the PR had been under I removed the active |
Summary
Use
cargo zigbuildfor static musl supervisor binary staging whenever it is available, including native CPU architectures. This keeps C dependencies such asaws-lc-syson the musl target toolchain instead of letting them fall back to the host GNU libc compiler path.Related Issue
None.
Context
This was reproduced on current
origin/mainat27fd31c9before this change. On the affected machine, the host isaarch64, glibc is2.42, andccis a Nix clang wrapper targetingaarch64-unknown-linux-gnu. A native-architecture supervisor build still targetsaarch64-unknown-linux-musl, so plain Cargo allowedaws-lc-sysC objects to pick up glibc-only references during a musl link:__isoc23_sscanf__fprintf_chkThe machine is not too old; the newer glibc/compiler path makes the existing target mismatch visible. The fix is to use the same Zig-backed musl target path for supervisor staging even when the CPU architecture matches the host.
Changes
has_cargo_zigbuildhelper to the prebuilt binary staging script.cargo zigbuildwhen available, including same-architecture Linux builds.architecture/build.mdwith the musl/C-dependency rationale.Testing
mise run pre-commitpassesmise run build:docker:supervisorpassesmise run buildpassesChecklist