From ce79aac590bc16f12aeca2977d257ade5eecb4bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Almeida?= Date: Sat, 2 May 2026 15:50:12 +0100 Subject: [PATCH] fix(build): always produce linux/amd64 agentctl as part of \`make build\` Remote executors (local Docker, remote Docker, Sprites) bind-mount the linux/amd64 agentctl binary into the container. On non-Linux hosts (e.g. macOS dev installs) running plain \`make build\` produced only the host binary, so the first Docker session would fail with: failed to build container config: agentctl linux binary not found The top-level \`make dev\` already special-cased non-Linux hosts to chain \`build-agentctl-linux\`, but \`make build\` and \`make start\` skipped it. Add it as a dependency of the standard backend build so every install ships a usable linux variant. Cross-compiling agentctl is fast (~1-2s) and the binary is ~20 MB, so the cost is negligible. Users who hit the error can run \`make build-backend\` (or \`make build\` in apps/backend) to regenerate; setting KANDEV_AGENTCTL_LINUX_BINARY remains a manual override. --- apps/backend/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/backend/Makefile b/apps/backend/Makefile index bfcdd014ea..c0c8cd2644 100644 --- a/apps/backend/Makefile +++ b/apps/backend/Makefile @@ -52,8 +52,11 @@ build-acpdbg: @$(MKDIR) $(BUILD_DIR) $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/acpdbg ./cmd/acpdbg -## Build the unified kandev binary -build: build-agentctl build-mock-agent build-acpdbg +## Build the unified kandev binary. Always includes the linux/amd64 agentctl +## variant because remote executors (local Docker, remote Docker, Sprites) +## bind-mount it into containers — without it, the first Docker session on a +## non-Linux host fails with "agentctl linux binary not found". +build: build-agentctl build-agentctl-linux build-mock-agent build-acpdbg @echo "Building $(BINARY_NAME)..." @$(MKDIR) $(BUILD_DIR) CGO_ENABLED=1 $(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/kandev