chore(docker): fix repoducible builds#403
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Rust build flags used in the rbuilder-reproducible Docker stage to address amd64 segfaults during reproducible Docker builds.
Changes:
- Removes
+crt-staticand-static-libgccfrom target-specific Cargo rustflags for x86_64/aarch64 GNU targets. - Removes the same static-linking flags from the reproducible-build
RUSTFLAGSused duringcargo build.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \ | ||
| RUSTFLAGS="-C target-feature=+crt-static -C link-arg=-static-libgcc -C link-arg=-lz -C link-arg=-Wl,--build-id=none -C metadata='' --remap-path-prefix=/app=." \ | ||
| RUSTFLAGS="-C link-arg=-lz -C link-arg=-Wl,--build-id=none -C metadata='' --remap-path-prefix=/app=." \ | ||
| CARGO_INCREMENTAL=0 \ |
There was a problem hiding this comment.
-C metadata is set to different values in the build environment: the target-specific CARGO_TARGET_*_RUSTFLAGS use -C metadata=target (lines 84–86), while the RUSTFLAGS used for the reproducible cargo build uses -C metadata='' (line 99). Having conflicting -C metadata settings makes it unclear which one wins and can undermine determinism depending on Cargo’s flag ordering. Consider consolidating on a single metadata setting (either remove it from the target-specific flags or from RUSTFLAGS) so the reproducible build has one unambiguous value.
Description
Reproducible docker builds are segfaulting on amd64. This fixes it