Bug 15554

Summary: reproducibility failures with 'rustdoc' on rust 1.75
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Sundeep Kokkonda <sundeep.kokkonda>
Component: devtools / tool chainAssignee: Sundeep Kokkonda <sundeep.kokkonda>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: meta.mr.watcher, meta.watcher, randy.macleod, richard.purdie
Version: unspecified   
Target Milestone: 5.1 M3   
Hardware: x86   
OS: Multiple   
Whiteboard: backport 5.0
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Sundeep Kokkonda 2024-07-18 09:02:15 UTC
The 'rustdoc' binary is not reproducible. Issue seen on rust 1.75.
More details:
https://lists.openembedded.org/g/openembedded-core/message/200077
Comment 1 Sundeep Kokkonda 2024-07-18 09:03:58 UTC
The issue is reproduced only when the path length of build directories are differed.
https://lists.openembedded.org/g/openembedded-core/message/201616
Comment 2 Sundeep Kokkonda 2024-07-18 09:07:08 UTC
This issue is reproducible on rust upstream sources and reported the bug to upstream.
https://github.com/rust-lang/rust/issues/126976

- The dump of librustdoc-xxxx.rlib's shows that the *.rcgu.o are with different sizes. I tried the builds by disabling the rcgu's with codegen-units = 1. But still the compiled rustdoc with single rcgu also differed.

- The increase of codegen-units = 256 or lto = off or opt-level = 0 also doesn't solve the problem.

Further analysis is on-going and upstream doesn't have any clue about the root cause of the issue.
Comment 3 Richard Purdie 2024-08-01 14:46:14 UTC
https://git.yoctoproject.org/poky/commit/?id=e2e7017350d0b5324811fef3b841f98b00273887

Great to have this fixed, thanks Sundeep!