Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reproducible-build-2 fails if debuginfo-level > 0 #66568

Closed
pnkfelix opened this issue Nov 20, 2019 · 0 comments · Fixed by #71931
Closed

reproducible-build-2 fails if debuginfo-level > 0 #66568

pnkfelix opened this issue Nov 20, 2019 · 0 comments · Fixed by #71931
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-reproducibility Area: Reproducible / deterministic builds C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@pnkfelix
Copy link
Member

pnkfelix commented Nov 20, 2019

On my Mac OS X system, trying to run the full compiler test suite for a build with debug = true in the config.toml fails due to something with the run-make-fulldeps/reproducible-build-2 test.

Update: more runs without altering debug setting and instead doing debuginfo-level=2 (which is implied by debug=true) or debuginfo-level=1 also have the same effect. So I assume that is root cause here.

Here is the output I am currently seeing there:

Check compiletest suite=run-make-fulldeps mode=run-make (x86_64-apple-darwin -> x86_64-apple-darwin)

running 204 tests
ii........i...ii........i....................i................i....................i................ 100/204
....i.........i........iiii.......i...i........iiii.iii........................i...........i........ 200/204
F...
failures:

---- [run-make] run-make-fulldeps/reproducible-build-2 stdout ----

error: make failed
status: exit code: 2
command: "make"
stdout:
------------------------------------------
rm -rf /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2 && mkdir /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2
DYLD_LIBRARY_PATH="/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2:/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/lib:" '/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2 -L /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2  reproducible-build-aux.rs
DYLD_LIBRARY_PATH="/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2:/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/lib:" '/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2 -L /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2  reproducible-build.rs -C lto=fat
cp /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build-a
DYLD_LIBRARY_PATH="/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2:/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/lib:" '/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/stage2/bin/rustc' --out-dir /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2 -L /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2  reproducible-build.rs -C lto=fat
cmp "/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build-a" "/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build" || exit 1
/Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build-a /Users/felixklock/Dev/Mozilla/rust.git/objdir-narrow/build/x86_64-apple-darwin/test/run-make-fulldeps/reproducible-build-2/reproducible-build-2/reproducible-build differ: char 334985, line 418

------------------------------------------
stderr:
------------------------------------------
make: *** [fat_lto] Error 1

------------------------------------------



failures:
    [run-make] run-make-fulldeps/reproducible-build-2

test result: FAILED. 177 passed; 1 failed; 26 ignored; 0 measured; 0 filtered out

It is possible that this is related to #47086

@pnkfelix pnkfelix added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-reproducibility Area: Reproducible / deterministic builds O-macos Operating system: macOS labels Nov 20, 2019
@jonas-schievink jonas-schievink added A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-bug Category: This is a bug. labels Nov 20, 2019
@pnkfelix pnkfelix changed the title reproducible-build-2 fails if debug=true in config.toml reproducible-build-2 fails if debuginfo-level=2 Nov 20, 2019
@pnkfelix pnkfelix changed the title reproducible-build-2 fails if debuginfo-level=2 reproducible-build-2 fails if debuginfo-level > 0 Nov 20, 2019
Centril added a commit to Centril/rust that referenced this issue Nov 20, 2019
…cible-build-2-on-macos, r=alexcrichton

Ignore run-make reproducible-build-2 on Mac

Ignore run-make reproducible-build-2 on Mac (we already ignore it on Windows).

Until we can dedicate resources to fixing this properly, I think we are best off just ignoring this test on platforms/contexts where it does not matter as much.

cc rust-lang#66568
bors added a commit to rust-lang-ci/rust that referenced this issue May 26, 2020
Export ZERO_AR_DATE for macos linker invocations

This commit attempts to improve reproducibility of builds on macOS by
exporting the `ZERO_AR_DATE=1` environment variable for all invocations
of the linker. While it looks like this env var is targeted at just the
`ar` command (which does actually read this) it appears that recent-ish
versions of the linker *also* read this environment variable. This
env var forces the linker to set a deterministic zero value for the
mtime in the N_OSO field of the object file.

Currently it's believe that older versions of the linker will simply
ignore this env var, while newer versions will read it and produce a
deterministic output for compilations with debuginfo.

Closes rust-lang#47086
Closes rust-lang#66568
@bors bors closed this as completed in afd88f2 May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) A-reproducibility Area: Reproducible / deterministic builds C-bug Category: This is a bug. O-macos Operating system: macOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants