Hand the contract a launcher it can execute - #169
Merged
Conversation
The Intel macOS host built its whole SDK, validated it, and then died
with
no such file or directory
naming nothing. The Rosetta gate passes `arch -x86_64` as the launcher
that lets an arm64 machine run what it cross-built, and that arrives as
one string. Interpolated into a VERBATIM COMMAND, a string with a space
in it is one argv[0], so what was looked up on disk was a program called
"arch -x86_64":
$ cmake -E env FOO=1 "arch -x86_64" cmake -E echo ran
no such file or directory
$ cmake -E env FOO=1 arch -x86_64 cmake -E echo ran
ran
The Intel host is cross-built, so the contract is the only thing that
executes what it produced: without it the host publishes unverified,
which is the situation the gate was written to end.
Second defect of the same commit, and it was hidden behind the first --
the build never reached the contract while the smoke test was killing
the arm64 leg it cross-builds from. tests/cmake/host-runner-command.cmake
runs the shape the target uses, with a two-word launcher that exists
wherever the test runs; against a runner that is not split it fails
three ways, one of them by not running the command at all.
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.
The Intel macOS host built its whole SDK, validated it, and then died naming nothing. From
vitasdk/autobuilds#36after #168 landed:VITASDK_HOST_RUNNERcarries the launcher that lets an arm64 machine run what it cross-built —arch -x86_64— and it arrives from the shell as one string. Interpolated into aVERBATIMCOMMAND, a string with a space in it is a singleargv[0], so what got looked up on disk was a program namedarch -x86_64:The second message is this arm64 laptop refusing to run its own arm64 cmake under
arch -x86_64, which is the point: the launcher was reached and did its job. On the runner the binary behind it is the x86_64 SDK, and Rosetta runs it.x86_64-apple-darwinis cross-built, socheck-toolchain-contractis the only thing that executes what it produced. Without it the host publishes unverified — the situationdb4d1a593was written to end.Second defect of the same commit, and it was hidden behind the first. While
run[@]: unbound variablewas killing the arm64 leg, the Intel job stopped atno build-machine SDK found for x86_64-apple-darwin (needs arm64-apple-darwin)and never got near the contract. Fixing #168 is what let this one surface.tests/cmake/host-runner-command.cmakeruns the shape the target uses — an environment, a two-word launcher, a command behind it — withcmake -E envas the launcher, because that exists wherever the test runs. Against a runner that is not split it fails three ways:The split lives in
cmake/HostRunner.cmakeso the test can call the same function the target does, rather than a copy of it. The shell side is unchanged:smoke_test_bootstrapsplits the same string on whitespace into an array, which is correct there.Every suite in the
checksjob passes locally.AI tools were used in preparing this PR (Claude Opus 5, Anthropic).