AlexsJones/llmfit · error · FileNotFoundError
No compiled binary found. Checked: {candidates} Run 'make
Error message
No compiled binary found. Checked:
{candidates}
Run 'make build' first. What it means
For editable installs (uv sync, uv run, pip install -e), _find_local_binary() checks only <repo>/target/debug/<binary> and <repo>/target/release/<binary>. This FileNotFoundError lists both checked paths and fires when neither exists - the Rust crate has not been compiled yet, so there is no binary to wire into the environment.
Source
Thrown at llmfit-python/hatch_build.py:133
)
return bin_path
@staticmethod
def _find_local_binary(llmfit_root: Path) -> Path:
"""Find the locally compiled binary in default Cargo output locations.
Checks ``target/debug/`` first (from ``make build``), then
``target/release/`` (from ``make release``).
"""
binary_name = "llmfit.exe" if sys.platform == "win32" else "llmfit"
candidates = [
llmfit_root / "target" / "debug" / binary_name,
llmfit_root / "target" / "release" / binary_name,
]
for candidate in candidates:
if candidate.is_file():
return candidate
raise FileNotFoundError(
"No compiled binary found. Checked:\n"
+ "\n".join(f" {c}" for c in candidates)
+ "\nRun 'make build' first.",
)
@staticmethod
def _check_binary_version(bin_path: Path, expected_version: str) -> None:
"""Run the binary with ``--version`` and verify it matches the expected version.
Raises ``RuntimeError`` on a mismatch — this indicates a stale build.
"""
result = subprocess.run(
[str(bin_path), "--version"],
capture_output=True,
check=True,
text=True,
timeout=5,
)View on GitHub (pinned to a9ac7ed91c)
Solutions
- Run `make build` (or `cargo build`) at the repository root, then repeat `uv sync`.
- Confirm `target/debug/llmfit` or `target/release/llmfit` now exists next to the Cargo workspace root.
- Unset CARGO_TARGET_DIR (or point it at <repo>/target) so cargo uses the location the hook scans.
- Rebuild after any `cargo clean` / `make clean` before invoking Python tooling.
Example fix
# before git clone <repo> && cd llmfit uv sync # FileNotFoundError: No compiled binary found ... Run 'make build' first. # after git clone <repo> && cd llmfit make build # cargo build -> target/debug/llmfit uv sync
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
repo = Path.cwd() # repository root when running uv sync
name = 'llmfit.exe' if __import__('sys').platform == 'win32' else 'llmfit'
if not any((repo / 'target' / profile / name).is_file() for profile in ('debug', 'release')):
raise SystemExit('Run `make build` (cargo build) before `uv sync`') Prevention
- Script onboarding as `make build && uv sync` so the cargo step always precedes the Python step.
- Do not set CARGO_TARGET_DIR to a custom location; the hook only scans <repo>/target/.
- Re-run make build after cargo clean or fresh clones.
- Cache target/ in CI so cleanups do not force surprise rebuild failures.
When it happens
Trigger: Fresh clone followed immediately by `uv sync` or `uv run --project llmfit-python pytest` without `cargo build`; running after `cargo clean` or `make clean`; building the workspace with a different target-dir or CARGO_TARGET_DIR env var so target/ is empty; building from a directory where the repo root (Path(self.root).parent) is not the Cargo workspace root.
Common situations: Onboarding: the README build order (make build first, then Python tooling) was skipped; CI cache of target/ invalidated; CARGO_TARGET_DIR set globally by a developer tool (e.g. sccache) so binaries land elsewhere.
Related errors
- Binary not found at {bin_path}. Expected it to be built for
- Unexpected output from '{bin_path} --version': {output!r}
- LLMFIT_PYTHON_PLATFORM_TAG is not supported for editable ins
- Invalid version: {version!r}
- No suitable wheel platform found for runtime platform {first
AI-assisted analysis of AlexsJones/llmfit@a9ac7ed91c (2026-08-16).
Data as JSON: /api/errors/49a7675629848b0b.
Report an issue: GitHub.