I hit a reproducible build failure in build() during:
bun run --cwd packages/desktop tauri build --bundles debbeforeBuildCommand bun run build:sidecar(packages/desktop/scripts/build-sidecar.mjs)
Root cause:
- build-sidecar.mjs resolves Bun with spawnSync('/bin/bash', ['-lc', 'command -v bun']) when BUN is not set.
- On systems where shell startup prints anything (e.g. fastfetch/neofetch in .bashrc/.zshrc), stdout is polluted.
- The script then treats that entire output blob as the executable path and fails with ENOENT (you can see syscall/path containing ANSI + ASCII art + /usr/bin/bun).
Suggested PKGBUILD hardening (explicit Bun path in build()):
build() {
cd "openchamber-${pkgver}"
export CARGO_HOME="${srcdir}/cargo-home"
export BUN_INSTALL_CACHE_DIR="${srcdir}/bun-cache"
export BUN=/usr/bin/bun
# ring crate assembly symbols become invisible when -flto emits LLVM bitcode
# objects; strip it so ring compiles to regular object files. See
# https://github.com/briansmith/ring/issues/2746
export CFLAGS="${CFLAGS/ -flto=auto/}"
export CFLAGS="${CFLAGS/ -flto/}"
export CXXFLAGS="${CXXFLAGS/ -flto=auto/}"
export CXXFLAGS="${CXXFLAGS/ -flto/}"
bun install --frozen-lockfile
APPIMAGE_EXTRACT_AND_RUN=1 bun run --cwd packages/desktop tauri build --bundles deb
}
Why this helps:
- build-sidecar.mjs first checks process.env.BUN; if set, it skips shell probing entirely.
- Makes builds deterministic across user environments regardless of shell dotfile output.
I verified locally that setting BUN=/usr/bin/bun avoids the failure.
Pinned Comments
pdizzle commented on 2026-04-01 13:11 (UTC)
between v1.9.1 to v1.9.2 the repository was renamed. A clean build will be required otherwise you will likely get errors that the existing repository on your system is not a clone of the current one