Bug 8509

Summary: Building buildtools for 64-bit then 32-bit causes a failure
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Paul Eggleton <bluelightning>
Status: VERIFIED FIXED QA Contact: Yi Zhao <yi.zhao>
Severity: normal    
Priority: Medium CC: alexandru.c.georgescu, meta.mr.watcher, meta.watcher, richard.purdie, yi.zhao
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: x86   
OS: x86   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Log of build failure none

Description Paul Eggleton 2015-10-13 18:33:40 UTC
Created attachment 2797 [details]
Log of build failure

If you build buildtools-tarball for 64-bit (SDKMACHINE not set on my 64-bit build machine) and then for 32-bit (SDKMACHINE = "i686") you get a failure due to a clash between files deployed by nativesdk-buildtools-perl-dummy in the two cases - log attached.
Comment 2 Yi Zhao 2016-01-21 07:34:03 UTC
(In reply to comment #1)
> Fix merged to master:
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=4ed84ffe0d4bb097258ffb5bf636509cf37a510c

I still got this error on 2.0.1 (jethro/dd0ba9ea4a11ab15348d4fe3574e4b28784db82f). Do we need to backport this patch to 2.0 ?
Comment 3 Richard Purdie 2016-01-21 16:22:18 UTC
I've backported the fix for 2.0.2 in the branch, not sure this should block 2.0.1.
Comment 4 Yi Zhao 2016-02-16 08:42:53 UTC
Verified with 2.0.1 rc6
git rev: jethro/5b12268f6e17574999f91628a60e21711cf62ee4

Steps:
1. Run 'bitbake buildtools-tarball' to build buildtools-tarball for 64-bit (SDKMACHINE not set on 64-bit host)
2. Then build buildtools-tarball for 32-bit (SDKMACHINE = "i686")

Currently we can not run 'bitbake core-image-minimal -c populate_sdk_ext' with SDKMACHINE="i686" on 64-bit host. Otherwise would get the following error:
#############################
ERROR: The extensible SDK can currently only be built for the same architecture as the machine being built on - SDK_ARCH is set to i686 (likely via setting SDKMACHINE) which is different from the architecture of the build machine (x86_64). Unable to continue.
ERROR: Function failed: do_populate_sdk_ext
ERROR: Logfile of failure stored in: /buildarea/poky/build/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_populate_sdk_ext.26012
ERROR: Task 12 (/buildarea/poky/meta/recipes-core/images/core-image-minimal.bb, do_populate_sdk_ext) failed with exit code '1'
#############################