can1357/oh-my-pi · error · RuntimeError

binary mode: no omp binary provided for container arch {arch

Error message

binary mode: no omp binary provided for container arch {arch}

What it means

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.

Source

Thrown at packages/metaharness/agent/omp_local.py:410

                'bun add --production "@oh-my-pi/pi-natives-linux-$na@$ver"'
            ),
            timeout_sec=900,
        )
        return f"{app}/dist/cli.js"

    async def _install_binary(self, environment: BaseEnvironment) -> str:
        """Probe container arch, upload only the matching self-contained omp binary."""
        arch = (
            await self.exec_as_agent(environment, command="uname -m")
        ).stdout.strip()
        if arch in ("aarch64", "arm64"):
            hostbin = self._binary_arm64
        elif arch in ("x86_64", "amd64"):
            hostbin = self._binary_x64
        else:
            raise RuntimeError(f"binary mode: unsupported container arch {arch!r}")
        if not hostbin:
            raise RuntimeError(
                f"binary mode: no omp binary provided for container arch {arch}"
            )
        app_dir = f"{self._home}/.omp-bench"
        dst = f"{app_dir}/omp"
        staging = "/tmp/omp-bin"
        await self.exec_as_agent(
            environment, command=f"mkdir -p {shlex.quote(app_dir)}"
        )
        await environment.upload_file(hostbin, staging)
        await self.exec_as_agent(
            environment,
            command=f"cp {shlex.quote(staging)} {shlex.quote(dst)} && chmod +x {shlex.quote(dst)}",
        )
        self._cli = dst
        return dst

    async def _install_published(self, environment: BaseEnvironment) -> str:
        app = f"{self._home}/.omp-bench/app"

View on GitHub (pinned to 9690622007)

Solutions

  1. 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.
  2. Pick a different install mode (source or local tarball).
  3. Build/copy the missing arch binary and re-run.
  4. Double-check which arch the container resolves to so you supply the right one.

Example fix

# before
OMP_BENCH_INSTALL=binary OMP_BENCH_BINARY_X64=/bin/omp ... # container is arm64 -> raises
# after
OMP_BENCH_INSTALL=binary OMP_BENCH_BINARY_ARM64=/bin/omp-arm64 ...
Defensive patterns

Strategy: validation

Validate before calling

import os, pathlib
if os.environ.get("OMP_BENCH_INSTALL") == "binary":
    for var in ("OMP_BENCH_BINARY_ARM64", "OMP_BENCH_BINARY_X64"):
        p = os.environ.get(var)
        assert p and pathlib.Path(p).is_file(), f"binary mode needs {var} set to a real file"

Try / catch

try:
    await harness.install(env)
except RuntimeError as e:
    if "no omp binary provided for container arch" in str(e):
        print("Supply the matching omp binary (OMP_BENCH_BINARY_ARM64/X64)")
        sys.exit(2)
    raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/509e0331cea3382e. Report an issue: GitHub.