Skip to content

chore(docker): fix repoducible builds#403

Open
theochap wants to merge 1 commit intoflashbots:mainfrom
theochap:theo/fix-repro-builds
Open

chore(docker): fix repoducible builds#403
theochap wants to merge 1 commit intoflashbots:mainfrom
theochap:theo/fix-repro-builds

Conversation

@theochap
Copy link
Contributor

Description

Reproducible docker builds are segfaulting on amd64. This fixes it

Copilot AI review requested due to automatic review settings February 23, 2026 20:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-static and -static-libgcc from target-specific Cargo rustflags for x86_64/aarch64 GNU targets.
  • Removes the same static-linking flags from the reproducible-build RUSTFLAGS used during cargo build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 98 to 100
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 \
Copy link

Copilot AI Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-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.

Copilot uses AI. Check for mistakes.
@theochap theochap mentioned this pull request Feb 24, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants