Repository navigation
fix(build): install server deps natively, not under QEMU (fixes stalled :latest builds) - #122
Merged
Merged
Conversation
…ed :latest builds) npm ci for linux/arm64 ran under QEMU emulation and intermittently crashed with "qemu: uncaught target signal 4 (Illegal instruction)"; buildx then hung instead of failing, stalling the :latest builds of v1.8.0 and v1.9.0. Nothing in the server deps needs compiling for the target CPU (better-sqlite3 bundles prebuilt binaries for every platform and picks one at runtime), so install them once on the build machine with --ignore-scripts and copy them into both images. Drops the python3/make/g++ toolchain stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KiL5R3bRpvGk6QP3E21eHF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
:latestimage builds for v1.8.0 and v1.9.0 hung in "Build and push". The log shows the cause:The arm64 image is built on x86 runners under QEMU emulation.
npm ci(whosebetter-sqlite3install step runsnode-gyp) intermittently crashed there, and buildx then hung instead of failing. It's intermittent, which is why a re-run worked. My earlier cache-scope change didn't address this.The fix is in the
server-depsstage:--platform=$BUILDPLATFORM, like the client stage) withnpm ci --omit=dev --ignore-scripts, so nothing runs npm under emulation.better-sqlite3ships prebuilt binaries for every platform inside the package and picks one at runtime (prebuilds/linuxmusl-<arch>.node); its node-gyp step was redundant.ssh2/cpu-featuresonly build optional speed-ups for Docker-over-SSH, which DockPull doesn't use; they fall back to JS.protobufjs's postinstall only prints a warning.linuxmusl-x64orlinuxmusl-arm64prebuild is missing.Testing
node:22-alpine(amd64): server starts, login, settings and history work, and better-sqlite3 loads (SQLite 3.53.4).libc.musl-aarch64andlibstdc++(both present innode:22-alpine). This sandbox can't emulate arm64 or reach Alpine's package mirror, so the full multi-arch image build is first exercised by the release workflow after merge.Generated by Claude Code