Bug 12743

Summary: Debug files contain absolute build host paths for non-x86 archs
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: hongxu.jia, meta.mr.watcher, meta.watcher, raj.khem, randy.macleod
Version: 5.99   
Target Milestone: 2.6 M3   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
diffoscope output demonstrating the bug. none

Description Juro Bystricky 2018-05-10 08:47:48 UTC
Created attachment 4300 [details]
diffoscope output demonstrating the bug.

For some architectures, the reproducibility is not as good as for x86. In particular arm, arm64, MIPS and MIPS64 do not build as many binary reproducible packages as x86. For example, for ARM/ARM64 core-image-minimal we get about 780 packages that are binary different (out of about 4000), vs x86 two. The numbers 
for MIPS are a bit better.

Typical build scenario, built in two different folders:

INHERIT+="reproducible_build"
MACHINE="qemuarm"
$ bitbake core-image-minimal

In spite of all of these differences, I believe there is only a single problem that needs to be addressed. It is the presence absolute of

ABS·​<build host workdir>/​recipe-​sysroot/​usr/​lib/​crti.​o

and

ABS·​<build host workdir>/​recipe-​sysroot/​usr/​lib/​crtn.​o


in debug symbols of in debug packages. This percolates to non-debug packages, as the .gnu_debuglink checksum will be affected.

${DEBUG_PREFIX_MAP} -fdebug-prefix-map somehow did not apply when the files crti.o and/or crtn.o were compiled.
Comment 1 Chen Qi 2018-06-12 02:16:32 UTC
Add Hongxu to CC, as I can recall that -fdebug-prefix-map is added by Hongxu?
Comment 2 Joshua Watt 2018-09-27 15:00:15 UTC
This might be related to this post on the mailing list:

http://lists.openembedded.org/pipermail/openembedded-core/2018-September/156192.html
Comment 3 Richard Purdie 2018-10-03 14:59:35 UTC
I have a patch on the mailing list which works around this issue in glibc and dramatically improves this on the architectures with this issue (non-IA basically).