Analyze C++/CUDA build errors, suggest fixes, and iteratively rebuild until success. Use when compilation fails.
Analyze build errors, suggest fixes, rebuild, and iterate until the build succeeds.
Reference: See .claude/skills/_shared/build-and-query.md for shared infrastructure (build modes, autonomy mode, change tracking).
Parse arguments:
release (default), relwithdebinfo, or clang-debug from $ARGUMENTS--max-iterations Ninteractive (default), autonomous, or semi-autonomousPre-build checks (run all before attempting the build):
a. Submodule verification:
git submodule status
Check that all submodules (duckdb, cucascade, extension-ci-tools, substrait, duckdb-python) are at expected commits. If any show a + prefix (out of sync), warn the user and offer:
git submodule update --init --recursive
b. Pixi environment:
Verify running inside pixi. If not, remind user to run pixi shell first.
c. sccache health:
sccache --show-stats
If it hangs or returns an error, restart:
sccache --stop-server && sccache --start-server
Run the build:
CMAKE_BUILD_PARALLEL_LEVEL=$(nproc) make <preset> 2>&1 | tail -200
If build succeeds: Report success and exit.
If build fails, analyze the error output:
error-patterns.mdApply the fix:
interactive mode: show the fix and wait for user approvalautonomous/semi-autonomous mode: apply immediately with git checkpointRebuild and repeat until success or max iterations reached.
If max iterations reached: Present summary of all attempted fixes and remaining errors.
When analyzing build errors:
git diff HEAD~1 to see if the error was introduced by a recent change.See error-patterns.md in this directory for a catalog of known Sirius build errors and their fixes.
rm -rf build but confirm with user first (destructive)CMAKE_BUILD_PARALLEL_LEVEL=4 make