Bug 4291

Summary: /usr/lib not containing native 64b libs for 64b target setup
Product: [Runtime] General Runtime Reporter: Heinz Wrobel <Heinz.Wrobel>
Component: General RuntimeAssignee: Saul Wold <sgw>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: richard.purdie
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: ppc   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Heinz Wrobel 2013-04-15 09:04:58 UTC
it seems that even for a 64b target kernel, yocto/bitbake will create /usr/lib and /usr/lib64 with /usr/lib containing 32b libs in the rootfs.

Shouldn’t it create /usr/lib (64b) and /usr/lib32 (32b) instead?

The current setup seems to confuse ./configure based manual package builds which try to find the native(==kernel) sized libs in /usr/lib whereas a native rootfs, e.g., pkg-config looks into /usr/lib64 when I think it should look into /usr/lib on a 64b target.
Comment 1 Richard Purdie 2013-04-15 11:15:10 UTC
The settings are completely configurable, for example:

require conf/multilib.conf

# Example of lib32 in a /usr/lib32 directory
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
baselib_virtclass-multilib-lib32 = "lib32"

# Example of lib64 in a /usr/lib64 directory
MULTILIBS = "multilib:lib64"
DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"
baselib_virtclass-multilib-lib64 = "lib64"

and you can change the default libdir with:

baselib = "lib"
baselib = "lib32"
baselib = "lib64"

as you want. So just pick the configuration you'd like!