{"record":{"id":"509e0331cea3382e","repo":"can1357/oh-my-pi","slug":"binary-mode-no-omp-binary-provided-for-container","errorCode":null,"errorMessage":"binary mode: no omp binary provided for container arch {arch}","messagePattern":"binary mode: no omp binary provided for container arch (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"packages/metaharness/agent/omp_local.py","lineNumber":410,"sourceCode":"                'bun add --production \"@oh-my-pi/pi-natives-linux-$na@$ver\"'\n            ),\n            timeout_sec=900,\n        )\n        return f\"{app}/dist/cli.js\"\n\n    async def _install_binary(self, environment: BaseEnvironment) -> str:\n        \"\"\"Probe container arch, upload only the matching self-contained omp binary.\"\"\"\n        arch = (\n            await self.exec_as_agent(environment, command=\"uname -m\")\n        ).stdout.strip()\n        if arch in (\"aarch64\", \"arm64\"):\n            hostbin = self._binary_arm64\n        elif arch in (\"x86_64\", \"amd64\"):\n            hostbin = self._binary_x64\n        else:\n            raise RuntimeError(f\"binary mode: unsupported container arch {arch!r}\")\n        if not hostbin:\n            raise RuntimeError(\n                f\"binary mode: no omp binary provided for container arch {arch}\"\n            )\n        app_dir = f\"{self._home}/.omp-bench\"\n        dst = f\"{app_dir}/omp\"\n        staging = \"/tmp/omp-bin\"\n        await self.exec_as_agent(\n            environment, command=f\"mkdir -p {shlex.quote(app_dir)}\"\n        )\n        await environment.upload_file(hostbin, staging)\n        await self.exec_as_agent(\n            environment,\n            command=f\"cp {shlex.quote(staging)} {shlex.quote(dst)} && chmod +x {shlex.quote(dst)}\",\n        )\n        self._cli = dst\n        return dst\n\n    async def _install_published(self, environment: BaseEnvironment) -> str:\n        app = f\"{self._home}/.omp-bench/app\"","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/can1357/oh-my-pi/blob/969062200754ea02cfac922e5ebb8c608c079e15/packages/metaharness/agent/omp_local.py#L392-L428","documentation":"In binary install mode, after resolving the container arch, omp_local checks that a prebuilt omp binary for that arch was actually supplied (_binary_arm64 or _binary_x64). If the corresponding binary path/bytes were not configured, install raises this RuntimeError because there is nothing to copy into the environment.","triggerScenarios":"OMP_BENCH_INSTALL=binary on an arm64 container without OMP_BENCH_BINARY_ARM64 set (or the x64 equivalent for an x86_64 container), so hostbin is falsy at install time.","commonSituations":"Forgot to pass the binary option/env var for the target arch; supplied only one arch's binary while the container is the other arch; binary path points to a nonexistent file that was filtered out during config parsing.","solutions":["Provide the binary for the container's arch, e.g. set OMP_BENCH_BINARY_ARM64 (or the x64 equivalent) to a valid prebuilt omp binary path.","Pick a different install mode (source or local tarball).","Build/copy the missing arch binary and re-run.","Double-check which arch the container resolves to so you supply the right one."],"exampleFix":"# before\nOMP_BENCH_INSTALL=binary OMP_BENCH_BINARY_X64=/bin/omp ... # container is arm64 -> raises\n# after\nOMP_BENCH_INSTALL=binary OMP_BENCH_BINARY_ARM64=/bin/omp-arm64 ...","handlingStrategy":"validation","validationCode":"import os, pathlib\nif os.environ.get(\"OMP_BENCH_INSTALL\") == \"binary\":\n    for var in (\"OMP_BENCH_BINARY_ARM64\", \"OMP_BENCH_BINARY_X64\"):\n        p = os.environ.get(var)\n        assert p and pathlib.Path(p).is_file(), f\"binary mode needs {var} set to a real file\"","typeGuard":null,"tryCatchPattern":"try:\n    await harness.install(env)\nexcept RuntimeError as e:\n    if \"no omp binary provided for container arch\" in str(e):\n        print(\"Supply the matching omp binary (OMP_BENCH_BINARY_ARM64/X64)\")\n        sys.exit(2)\n    raise","preventionTips":["Always pass both arch binaries when the container arch is unknown.","Verify binary paths exist before launching the benchmark.","Keep binary mode config in one validated place."],"tags":["configuration","missing-argument","binary-install"],"backgroundTag":"missing-config-value","analyzedSha":"969062200754ea02cfac922e5ebb8c608c079e15","analyzedAt":"2026-08-31T10:29:35.737Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}