mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
The shipped aarch64-unknown-linux-musl binary segfaulted at startup on every arm64 runtime (Apple Silicon, Graviton, Ampere, Docker arm64). Root cause: a glibc-vs-musl .init_array calling-convention mismatch -- a C static library in the dep graph has an __attribute__((constructor)) that expects (argc, argv, envp) per glibc, but musl on aarch64 calls it with no args, so register garbage propagates into pointer arithmetic and faults before main runs. Switch the musl compile steps to cargo-zigbuild (zig 0.13.0). Zig's bundled cc + lld produce working static-PIE binaries for both musl targets, sidestepping Ubuntu musl-tools' -no-pie quirk and the init_array ordering that triggered the crash. Drop the CARGO_TARGET_* linker overrides and the musl-tools apt install -- zig handles both. bin/dev/docker-build.sh mirrors the same toolchain so the local Docker image build matches CI. Verified by running fabro version from the resulting arm64 image on ghcr.io/fabro-sh/dhi-alpine-base:3.23-dev, alpine:3.22, and debian:stable-slim -- all print the version banner with exit 0. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| agent | ||
| dev | ||
| ops | ||