Hmbown/CodeWhale · critical
macOS builds require Xcode Command Line Tools to package…
Error message
macOS builds require Xcode Command Line Tools to package Computer Use
What it means
This panic comes from crates/tui/build.rs:64 inside build_computer_use_helper. The build script shells out to the macOS toolchain (clang with Vision framework flags) to compile the Computer Use helper binary, and .expect() panics if the compiler process cannot be spawned. It exists so macOS packaging fails with a clear message instead of an obscure linker error later.
Solutions
- Install the toolchain: run `xcode-select --install` and accept the dialog.
- Verify with `clang --version` and `xcode-select -p` that the tools are installed and active.
- If multiple Xcode installs exist, point the host at one: `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`.
- Fix PATH in CI so /usr/bin (containing clang) is available to the build script.
- On non-macOS hosts this build step should be skipped; confirm target OS detection in build.rs is correct rather than installing Xcode.
Example fix
// before
.output()
.expect("macOS builds require Xcode Command Line Tools to package Computer Use");
// after
// install tools first, e.g. in CI:
// xcode-select --install || true
.output()
.expect("macOS builds require Xcode Command Line Tools to package Computer Use (run: xcode-select --install)"); Defensive patterns
Strategy: validation
Validate before calling
// in build.rs, before invoking clang
if !Command::new("clang").arg("--version").output().map(|o| o.status.success()).unwrap_or(false) {
panic!("clang not found; install Xcode Command Line Tools: xcode-select --install");
} Prevention
- Add an xcode-select --install step to macOS CI images and dev setup docs.
- Smoke-check `clang --version` and `codesign --version` in CI before cargo build.
- Keep the Computer Use helper build step gated on target_os = "macos" so non-mac hosts never need clang.
- Document the toolchain requirement in the build script's panic message and README.
When it happens
Trigger: Running cargo build/test for crates/tui on a macOS host where the `clang` invocation in build_computer_use_helper cannot be executed via std::process::Command::output() — i.e. no Xcode Command Line Tools installed or clang not on PATH.
Common situations: Fresh macOS machine or CI runner without `xcode-select --install`; Xcode CLT upgraded/removed by a system update; building inside a sandboxed container image that lacks the toolchain; PATH stripped of /usr/bin in the build environment.
Related errors
- macOS builds require codesign to package Computer Use
- app-icon blob has unexpected height
- app-icon blob not found in the founder sheet
- application not found — call list_apps for exact names/pids
- ApplyPatchPreflight should serialize
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/a31fee902a77e1bb.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/build.rs:64
"-mmacosx-version-min=13.0",
"-framework",
"Cocoa",
"-framework",
"ApplicationServices",
"-framework",
"ScreenCaptureKit",
"-framework",
"AVFoundation",
"-framework",
"CoreMedia",
"-framework",
"Vision",
])
.arg(&source)
.arg("-o")
.arg(&output)
.output()
.expect("macOS builds require Xcode Command Line Tools to package Computer Use");
assert!(
compiled.status.success(),
"Computer Use helper compilation failed: {}",
String::from_utf8_lossy(&compiled.stderr)
);
// Developer builds use ad-hoc signing; release builders can supply the
// same Developer ID as the app. No keychain lookup or credential copying.
let identity = std::env::var("CODEWHALE_CU_SIGN_IDENTITY").unwrap_or_else(|_| "-".into());
let signed = std::process::Command::new("codesign")
.args([
"--force",
if identity == "-" {
"--timestamp=none"
} else {
"--timestamp"
},
"--options",
"runtime",View on GitHub (pinned to 73e0f67d83)