From bb63d16f3c5bd9864772bd94f9e1dcb8e0fba157 Mon Sep 17 00:00:00 2001 From: LukeParkerDev <10430890+Hona@users.noreply.github.com> Date: Thu, 22 Oct 2026 21:59:58 +1000 Subject: [PATCH] fix(opencode): install musl native packages for cross builds on Bun 1.4.4 --- packages/cli/script/build.ts | 3 ++- packages/opencode/script/build.ts | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/cli/script/build.ts b/packages/cli/script/build.ts index f42d8b07b0d3..6b68b4a19192 100755 --- a/packages/cli/script/build.ts +++ b/packages/cli/script/build.ts @@ -48,7 +48,8 @@ const targets = singleFlag }) : allTargets -if (!skipInstall) await $`bun install --os="*" --cpu="*" @opentui/core@${pkg.dependencies["@opentui/core"]}` +// Bun 1.4.4 skips native packages for the other libc by default, but the musl targets need them. +if (!skipInstall) await $`bun install --os="*" --cpu="*" --libc="*" @opentui/core@${pkg.dependencies["@opentui/core"]}` for (const item of targets) { const target = [ diff --git a/packages/opencode/script/build.ts b/packages/opencode/script/build.ts index b71391103c65..60a674a4f869 100755 --- a/packages/opencode/script/build.ts +++ b/packages/opencode/script/build.ts @@ -138,9 +138,10 @@ await $`rm -rf dist` const binaries: Record = {} if (!skipInstall) { - await $`bun install --os="*" --cpu="*" @opentui/core@${pkg.dependencies["@opentui/core"]}` - await $`bun install --os="*" --cpu="*" @parcel/watcher@${pkg.dependencies["@parcel/watcher"]}` - await $`bun install --os="*" --cpu="*" @ff-labs/fff-bun@${pkg.dependencies["@ff-labs/fff-bun"]}` + // Bun 1.4.4 skips native packages for the other libc by default, but the musl targets need them. + await $`bun install --os="*" --cpu="*" --libc="*" @opentui/core@${pkg.dependencies["@opentui/core"]}` + await $`bun install --os="*" --cpu="*" --libc="*" @parcel/watcher@${pkg.dependencies["@parcel/watcher"]}` + await $`bun install --os="*" --cpu="*" --libc="*" @ff-labs/fff-bun@${pkg.dependencies["@ff-labs/fff-bun"]}` } for (const item of targets) { const name = [