can1357/oh-my-pi · error · Error
omp --version failed: ${warmup.stderr.trim()}
Error message
omp --version failed: ${warmup.stderr.trim()} What it means
As a post-install warmup, installAgent executes `/opt/omp/omp --version` inside the VM. Non-zero exit means the freshly installed binary does not run, so this error is thrown with the binary's stderr.
Source
Thrown at packages/metaharness/src/tb/agent.ts:100
const binaries: AgentBinaries = { version: manifest.version };
for (const arch of arches) binaries[arch] = cached[arch];
return binaries;
}
/** Install omp and gateway-only configuration into one running trial microVM. */
export async function installAgent(vm: TrialVm, binaries: AgentBinaries, gateway: GatewayConfig): Promise<string> {
const binary = binaries[vm.arch];
if (!binary) throw new Error(`No omp binary available for guest architecture ${vm.arch}`);
const entrypoint = "/opt/omp/omp";
const mkdir = await vm.exec("mkdir -p /opt/omp");
if (mkdir.exitCode !== 0) throw new Error(`Could not create /opt/omp: ${mkdir.stderr.trim()}`);
await vm.copyTo(binary, entrypoint);
const chmod = await vm.exec(`chmod 755 ${shellQuote(entrypoint)}`);
if (chmod.exitCode !== 0) throw new Error(`Could not make omp executable: ${chmod.stderr.trim()}`);
const warmup = await vm.exec(`${shellQuote(entrypoint)} --version`);
if (warmup.exitCode !== 0) throw new Error(`omp --version failed: ${warmup.stderr.trim()}`);
const providers = [...new Set(gateway.providers)];
const modelLines = ["# Generated by metaharness — auth via host pm2 gateway.", "providers:"];
for (const provider of providers) {
modelLines.push(` ${provider}:`);
modelLines.push(` baseUrl: ${gateway.url}`);
modelLines.push(" auth: oauth");
modelLines.push(" transport: pi-native");
modelLines.push(` apiKey: ${gateway.token}`);
}
const modelsYaml = `${modelLines.join("\n")}\n`;
const configYaml = `providers:
openrouterVariant: ${gateway.openrouterVariant}
modelRoles:
vision: openrouter/qwen/qwen3.7-flash
edit:
mode: replace
web_search:View on GitHub (pinned to 9690622007)
Solutions
- Read stderr: 'Exec format error' = arch mismatch; 'not found' for a shared library = link mismatch
- Confirm binaries[vm.arch] matches the guest architecture
- Re-copy the binary and re-run `omp --version` manually in the VM to reproduce
- Rebuild omp statically or for the guest's libc (musl vs glibc)
- Check the guest kernel version meets the binary's minimum
Example fix
// before: x86_64 binary copied into arm64 guest -> 'Exec format error'
const binary = binaries[vm.arch];
if (!binary) throw new Error(`No omp binary available for guest architecture ${vm.arch}`);
// after: fail fast with an explicit arch check before warmup
const arch = await vm.exec("uname -m");
if (!binary || !binary.path.includes(arch.stdout.trim())) {
throw new Error(`omp binary does not match guest arch ${arch.stdout.trim()}`);
} Defensive patterns
Strategy: try-catch
Validate before calling
const arch = (await vm.exec("uname -m")).stdout.trim();
if (!binaries[arch]) throw new Error(`no omp binary for guest arch ${arch}`); Try / catch
try {
await installAgent(vm, binaries, gateway);
} catch (err) {
if (String(err.message).includes("omp --version failed")) {
const dbg = await vm.exec("file /opt/omp/omp; ldd /opt/omp/omp || true");
console.error(dbg.stdout, err);
}
throw err;
} Prevention
- Build static or musl binaries for guest compatibility
- Keep binaries map keyed by exact `uname -m` output
- Re-verify binary integrity (checksum) after copyTo
When it happens
Trigger: `omp --version` exits non-zero — the binary was built for the wrong guest architecture (vm.arch mismatch), missing dynamic libraries, corrupt/truncated copy, or the binary crashes at startup.
Common situations: Cross-arch VM (arm64 guest, x86_64 binary) with no binfmt/qemu emulation; glibc/musl mismatch between build host and guest; interrupted copyTo leaving a truncated file; binary requires a newer kernel than the guest runs.
Related errors
- Unsupported protobuf wire type ${wireType} at byte ${reader.
- Unsupported wire type ${entryWireType} in map entry
- Unsupported architecture: ${arch}
- ${formatVerificationFailure(verification, expectedVersion)};
- source mode: container arch {arch!r} != mounted deps tree ar
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/ee9d51985ebe6dd2.
Report an issue: GitHub.