Bug 1362 - gcc-cross-intermediate build failure in lib64 multilib case
Summary: gcc-cross-intermediate build failure in lib64 multilib case
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1 M4
Assignee: Ke Yu
QA Contact:
URL:
Whiteboard: Patch sent out. Aug 14
Depends on:
Blocks:
 
Reported: 2011-08-10 23:32 UTC by Ke Yu
Modified: 2011-09-02 14:31 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ke Yu 2011-08-10 23:32:35 UTC
In the qemux86-64 lib64 multilib case, gcc-cross-intermediate has build failure: 

| mv: cannot stat `/home/kyu3/sdb/multilib2/tmp/work/x86_64-pokymllib64-linux/lib64-gcc-cross-intermediate-4.6.1+svnr175454-r4/image/home/kyu3/sdb/     multilib2/tmp/sysroots/x86_64-linux/usr/x86_64-pokymllib64-linux/lib64/*': No such file or directory                                                    NOTE: package lib64-gcc-cross-intermediate-4.6.1+svnr175454-r4: task do_install: Failed
ERROR: Task 1557 (virtual:multilib:lib64:/home/kyu3/src/poky/meta/recipes-devtools/gcc/gcc-cross-intermediate_4.6.bb, do_install) failed with exit code '1'                                                                                                                                                     

Reproduce step:
commit: 786033f53cad2a196ae6f3a05574148578ea3894 
enable multilib in local.conf:

MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib64"
DEFAULTTUNE_virtclass-multilib-lib64 = "x86-64"

# bitbake lib64-core-image-sato
Comment 1 Ke Yu 2011-08-10 23:34:25 UTC
The culprit is:
"
commit 35fa8dc5f7da90fdd40091a3c3600d3fcd232922
Author: Kumar Gala <galak@kernel.crashing.org>
Date:   Thu Aug 4 13:54:59 2011 -0500

    gcc: use ${base_lib} to match gcc default configuration

    Rather than tweaking MULTILIB_DIRNAMES & MULTILIB_OSDIRNAMES like is
    done for x86-64 via 64bithack.patch.  We can just go with gcc defaults
    and utilize ${base_lib} for where to find gcc libs.

    (From OE-Core rev: cfcc282efef30ea1988ccbe14835254a999584ea)

    Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
index df5958a..7b1bb38 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
+++ b/meta/recipes-devtools/gcc/gcc-cross-intermediate.inc
@@ -34,7 +34,7 @@ do_compile () {
 do_install () {
        oe_runmake 'DESTDIR=${D}' install
        install -d ${D}${target_base_libdir}/
-       mv ${D}${exec_prefix}/${TARGET_SYS}/lib/* ${D}${target_base_libdir}/
+       mv ${D}${exec_prefix}/${TARGET_SYS}/${baselib}/* ${D}${target_base_libdir}/

        # We don't really need this (here shares/ contains man/, info/, locale/).
        rm -rf ${D}${datadir}/
"

the reason is that: ${baselib} is lib64 in multilib case, while the files to be moved is still in ${D}${exec_prefix}/${TARGET_SYS}/lib/*,  so mv will fail.