{"record":{"id":"dcbe65be1e37838b","repo":"AlexsJones/llmfit","slug":"no-compiled-binary-found-checked-c-run-make","errorCode":null,"errorMessage":"No compiled binary found. Checked:\n  {c}\nRun 'make build' first.","messagePattern":"No compiled binary found\\. Checked:\n  (.+?)\nRun 'make build' first\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"llmfit-python/hatch_build.py","lineNumber":133,"sourceCode":"            )\n        return bin_path\n\n    @staticmethod\n    def _find_local_binary(llmfit_root: Path) -> Path:\n        \"\"\"Find the locally compiled binary in default Cargo output locations.\n\n        Checks ``target/debug/`` first (from ``make build``), then\n        ``target/release/`` (from ``make release``).\n        \"\"\"\n        binary_name = \"llmfit.exe\" if sys.platform == \"win32\" else \"llmfit\"\n        candidates = [\n            llmfit_root / \"target\" / \"debug\" / binary_name,\n            llmfit_root / \"target\" / \"release\" / binary_name,\n        ]\n        for candidate in candidates:\n            if candidate.is_file():\n                return candidate\n        raise FileNotFoundError(\n            \"No compiled binary found. Checked:\\n\"\n            + \"\\n\".join(f\"  {c}\" for c in candidates)\n            + \"\\nRun 'make build' first.\",\n        )\n\n    @staticmethod\n    def _check_binary_version(bin_path: Path, expected_version: str) -> None:\n        \"\"\"Run the binary with ``--version`` and verify it matches the expected version.\n\n        Raises ``RuntimeError`` on a mismatch — this indicates a stale build.\n        \"\"\"\n        result = subprocess.run(\n            [str(bin_path), \"--version\"],\n            capture_output=True,\n            check=True,\n            text=True,\n            timeout=5,\n        )","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/AlexsJones/llmfit/blob/acc7e40c3a0afbd36510a92f2f8f3d5177cfc0fe/llmfit-python/hatch_build.py#L115-L151","documentation":"Raised by LlmfitBinaryBuildHook._find_local_binary() during an editable install (uv sync / uv run / pip install -e). Editable builds do not use a --target directory; the hook checks target/debug/llmfit (from `make build` / `cargo build`) and then target/release/llmfit (from `make release`). If neither file exists it raises FileNotFoundError with both checked paths and the hint to run 'make build'.","triggerScenarios":"Cloning the repo and running `uv sync` or `uv run --project llmfit-python pytest` before any `cargo build`; after `cargo clean`; or after a fresh checkout in CI where the Rust build step was skipped or failed earlier in the pipeline.","commonSituations":"New contributor onboarding (installing the Python wrapper before building Rust); CI cache eviction of target/; switching branches after a cargo clean; `make build` failed silently in a previous step and the job continued.","solutions":["Run `make build` (or `cargo build`) in the repository root, then retry the editable install","If you want the optimized binary for daily use, run `make release` instead — the release binary is also accepted","Verify the artifact exists: `ls target/debug/llmfit target/release/llmfit` — one of them must be present (llmfit.exe on Windows)"],"exampleFix":"# before\nuv sync\n# => FileNotFoundError: No compiled binary found. Checked: target/debug/llmfit, target/release/llmfit\n\n# after\nmake build\nuv sync","handlingStrategy":"validation","validationCode":"import sys\nfrom pathlib import Path\nname = \"llmfit.exe\" if sys.platform == \"win32\" else \"llmfit\"\ncandidates = [Path(\"target/debug\") / name, Path(\"target/release\") / name]\nif not any(c.is_file() for c in candidates):\n    raise SystemExit(\"no local binary — run `make build` (or `cargo build`) before `uv sync`/editable install\")","typeGuard":null,"tryCatchPattern":"try:\n    bin_path = hook._find_local_binary(root)\nexcept FileNotFoundError as e:\n    raise SystemExit(f\"run `make build` first, then retry: {e}\")","preventionTips":["Document `make build` as step one of the contributor setup, before uv sync","In CI, make the Rust build step a hard dependency of any editable install step","Watch for cargo clean in scripts; re-run make build afterwards"],"tags":["python","rust","editable-install","build-artifact","developer-setup"],"backgroundTag":"missing-build-artifact","analyzedSha":"acc7e40c3a0afbd36510a92f2f8f3d5177cfc0fe","analyzedAt":"2026-08-17T10:35:29.658Z","contentChangedAt":"2026-08-17T10:35:29.658Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}