Bug 12478

Summary: ldd_2.26: non-deterministic build
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Juro Bystricky <juro.bystricky>
Component: devtools / tool chainAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: Medium CC: liezhi.yang, meta.mr.watcher, meta.watcher, randy.macleod
Version: 2.5   
Target Milestone: 2.7 M3   
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 18:11:45 UTC
Created attachment 4173 [details]
diffoscope output comparing two builds.

Two builds on the same host can reside in slightly different ldd binaries due to unsorted RTLDLIST. Please see the attached file.
(sorting RTLDLIST in recipes-core/glibc/glibc-ld.inc would probably fix this)
Comment 1 Juro Bystricky 2018-02-05 18:43:38 UTC
Patch sent to ML:
https://patchwork.openembedded.org/patch/147888/
Comment 2 Hongxu Jia 2018-12-10 01:34:59 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>