Bug 12480

Summary: libc6-dbg: non deterministic build (multilib)
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, meta.mr.watcher, meta.watcher, randy.macleod
Version: 2.5   
Target Milestone: 2.7 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
diffoscope output comparing two builds. none

Description Juro Bystricky 2018-01-12 21:13:48 UTC
Created attachment 4175 [details]
diffoscope output comparing two builds.

As can be seen in the attached diffoscope output, in otherwise identical builds we can end up with readlib.c containing interpreters in different order.
Comment 1 Juro Bystricky 2018-02-05 18:44:50 UTC
patch sent to ML:
https://patchwork.openembedded.org/patch/147888/
Comment 2 Hongxu Jia 2018-12-10 01:34:12 UTC
Merged to oe-core

commit 3f839c0cdfe253677ebee47838fe476a0939e0aa
Author: Hongxu Jia <hongxu.jia@windriver.com>
Date:   Thu Dec 6 16:56:15 2018 +0800

    glibc: improve reproducibility with multilib
    
    Multilib builds specify several loaders which will end up embedded in
    some binaries or script files. To support reproducible builds, we must
    ensure the loaders are always in deterministic order.
    
    [YOCTO #2655]
    [YOCTO #12478]
    [YOCTO #12480]
    
    Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
    
    Improve the fix and rebase it to 2.28
    
    Here is the log of lib32-glibc
    [log.do_compile]
    |Adjust ldd script
    |ldd "/lib64/ld-linux-x86-64.so.2 /lib/ld-linux.so.2 /lib/ld-linux.so.2
    /lib64/ld-linux-x86-64.so.2" -> "/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2"
    [log.do_compile]
    
    Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>