Bug 2965

Summary: cross linker picks up host libraries via -rpath argument
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Andy Ross <andy.ross>
Component: devtools / tool chainAssignee: Andy Ross <andy.ross>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: Medium CC: meta.mr.watcher, meta.watcher, ross.burton, sgw, sstncr
Version: unspecified   
Target Milestone: 1.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Script to exercise the incorrect search path behavior none

Description Andy Ross 2012-08-17 15:05:27 UTC
Created attachment 696 [details]
Script to exercise the incorrect search path behavior

When called with a --sysroot and -rpath argument, the linker will probe host directories instead of interpreting the rpath relative to sysroot.  See the attached script.  The same is not true of RPATH fields in the ELF header, which are searched in the sysroot correctly.

Due to an unrelated issue where libtool will generate binaries with -rpath arguments of e.g. "/usr/lib/../lib".  This can collide with a host directory and cause build failures due to version skew.
Comment 1 Andy Ross 2012-08-23 17:34:15 UTC
Fix posted to oe-core 2012-08-23.  I assume I just mark this fixed myself?
Comment 2 Ross Burton 2012-10-02 10:43:34 UTC
Submission to oe-core doesn't count as fixed.  It's fixed when it's merged.
Comment 3 Stefan Stanacar 2012-10-02 11:12:40 UTC
Actually, my bad that I didn't found the commit at first, but it was merged: 

commit 8592e828261fb4a48b8156e11b5859d38aeb403f
Author: Andy Ross <andy.ross@windriver.com>
Date:   Thu Aug 23 17:32:31 2012 +0000
Comment 4 Stefan Stanacar 2012-11-01 15:00:38 UTC
Verified in danny / 27af23e65f63b41962a7cfddba9e9372d5212396