fix(driver-vm): preflight supervisor cross-compile toolchain in start.sh#931
Merged
Merged
Conversation
The VM driver dev script cross-compiles the in-guest openshell-sandbox supervisor to Linux via cargo-zigbuild. When either the target rustup component or cargo-zigbuild is missing, the only visible error was a wall of "could not compile" summaries because build-rootfs.sh piped cargo output through `tail -5`, truncating the helpful rustup hint. - start.sh now checks for cargo-zigbuild and the matching <arch>-unknown-linux-gnu rustup target before kicking off the rootfs build, and prints exact install commands when either is missing. The check is skipped on native Linux same-arch builds where plain cargo build works. - build-rootfs.sh captures full cargo output to a tempfile: tails on success for brevity, dumps the whole log on failure so the real error surfaces. - README prerequisites for both openshell-driver-vm and openshell-vm now list the cross-compile toolchain explicitly.
Collaborator
Author
|
@drew this is a small improvement for getting
|
TaylorMutch
approved these changes
Apr 23, 2026
drew
approved these changes
Apr 23, 2026
maxamillion
added a commit
to maxamillion/OpenShell
that referenced
this pull request
Apr 23, 2026
…dman # By Piotr Mlocek (2) and Drew Newberry (1) # Via GitHub * upstream/main: fix(ci): e2e gate must verify work actually ran, not just top-level success (NVIDIA#926) fix(driver-vm): preflight supervisor cross-compile toolchain in start.sh (NVIDIA#931) feat(server,driver-vm,e2e): gateway-owned readiness + VM compute driver e2e (NVIDIA#901) # Conflicts: # crates/openshell-server/src/compute/mod.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/openshell-driver-vm/start.shcross-compiles the in-guestopenshell-sandboxsupervisor viacargo-zigbuild. When either the matching<arch>-unknown-linux-gnurustup target orcargo-zigbuilditself was missing, the visible failure was a wall of "could not compile libc/zeroize/..." summaries with no hint about the root cause —build-rootfs.shwas piping the real cargo output throughtail -5, truncating the rustup-suggested fix.start.shthat verifies the cross-compile toolchain before the expensive docker + rootfs build kicks off, and prints exact install commands when something is missing. Check is scoped to cases where cross-compilation is actually needed (macOS host, or Linux host where host arch ≠ guest arch).build-rootfs.shto tee cargo/zigbuild output to a tempfile: tail on success to keep logs tidy, dump the whole log to stderr on failure so the real error surfaces.openshell-driver-vmandopenshell-vmREADME Prerequisites to call outrustup target add <arch>-unknown-linux-gnuandcargo install --locked cargo-zigbuild+zig.Related Issue
N/A — developer-experience fix surfaced while debugging
start.shlocally.Changes
crates/openshell-driver-vm/start.sh— newcheck_supervisor_cross_toolchain()function, invoked beforemise run vm:rootfs.crates/openshell-vm/scripts/build-rootfs.sh— capture full cargo output to a log; tail-on-success, cat-on-failure.crates/openshell-driver-vm/README.md,crates/openshell-vm/README.md— document the cross-compile toolchain in Prerequisites.Testing
bash -nparses cleanly under both macOS/bin/bash(3.2) and Homebrewbash(5.x).aarch64-unknown-linux-gnuviarustup target remove, re-ranstart.sh; preflight fires with actionable error and non-zero exit before any docker activity.x86_64-unknown-linux-gnupath (no amd64 Mac available). Same code path, just the target string differs.Checklist
fix(driver-vm): ...)