Bug 2520

Summary: mklibs: Can't handle multilib paths
Product: [Build System, Metadata & Runtime] Other YP Layers Reporter: Mark Hatle <mark.hatle>
Component: layersAssignee: Constantin Musca <constantinx.musca>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.damian, jessica.zhang, meta.layer.watcher, meta.watcher, sgw, song.liu
Version: unspecified   
Target Milestone: 1.3   
Hardware: x86   
OS: Multiple   
Whiteboard: d6ef548c48968d16f7e24dec7452ddb455c26d46
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Mark Hatle 2012-05-29 19:51:37 UTC
The mklibs script appears to have hardcoded references to /lib, /usr/lib and /usr/X11R6/lib in it.  These references need to support the variable baselib paths supported by OE-Core.

In order to reproduce the problem:

setup a build, configure local.conf with:

MULTILIBS = ""
require conf/multilib.conf

Enable mklibs with:

MKLIBS_OPTIMIZED_IMAGES ?= "all"


Build a filesystem on a target that does NOT have "/lib", such as qemux86-64.. It will generate a python failure in the mklibs process.
Comment 1 Constantin Musca 2012-09-26 09:12:54 UTC
Testing config:

local.conf:
MULTILIBS = ""
require conf/multilib.conf
MKLIBS_OPTIMIZED_IMAGES ?= "all"

MACHINE: qemux86-64

Everything seems fine (no error). Can you give me more details?

Constantin
Comment 2 Mark Hatle 2012-09-26 14:45:24 UTC
perhaps this has been fixed?

The issue (when first reported) was that '/lib' was hard coded into the mklibs.  If you built an architecture that didn't have a /lib, or the libraries were not in /lib, you would either get a large number of warnings/errors (non-fatal) in the rootfs log... or you would end up with a python failure (fatal).

The end result was that the target filesystem, if it completed, would not actually be prelinked.
Comment 3 Mark Hatle 2012-09-26 14:46:12 UTC
in the last comment I meant library optimized, NOT prelinked.  Sorry.
Comment 4 Constantin Musca 2012-09-26 15:05:21 UTC
This bug has been fixed.

commit d6ef548c48968d16f7e24dec7452ddb455c26d46
Author: Jesse Zhang <sen.zhang@windriver.com>
Date:   Tue Aug 7 10:31:57 2012 +0800
    image-mklibs: pass correct libdir to mklibs
    
    libdir should be specified, or else mklibs won't work for 64bit targets.
    It wouldn't be able to find the libs.
...

Cheers,
Constantin