Wind River Support Network

HomeDefectsLIN9-6743
Fixed

LIN9-6743 : Error building SDK for Windows and Linux from the same project

Created: Apr 24, 2018    Updated: Dec 3, 2018
Resolved Date: Aug 10, 2018
Found In Version: 9.0.0.15
Fix Version: 9.0.0.18
Severity: Severe
Applicable for: Wind River Linux 9
Component/s: Build & Config

Description

If you generate an SDK for an OS and then you try to create another one for another platform it will fail with the message below:

ERROR: packagegroup-cross-canadian-qemux86-1.0-r0 do_packagedata: The recipe packagegroup-cross-canadian-qemux86 is trying to install files into a shared area when those files already exist. Those files and their manifest location are:
   /projects/00084758_lx9_0015_qemux86_prj/build/tmp/sysroots/qemux86/pkgdata/packagegroup-cross-canadian-qemux86
 Matched in b'manifest-x86_64_x86_64-nativesdk-packagegroup-cross-canadian-qemux86.packagedata'
 /projects/00084758_lx9_0015_qemux86_prj/build/tmp/sysroots/qemux86/pkgdata/runtime/packagegroup-cross-canadian-qemux86
 Matched in b'manifest-x86_64_x86_64-nativesdk-packagegroup-cross-canadian-qemux86.packagedata'
 /projects/00084758_lx9_0015_qemux86_prj/build/tmp/sysroots/qemux86/pkgdata/runtime/packagegroup-cross-canadian-qemux86.packaged
 Matched in b'manifest-x86_64_x86_64-nativesdk-packagegroup-cross-canadian-qemux86.packagedata'
 /projects/00084758_lx9_0015_qemux86_prj/build/tmp/sysroots/qemux86/pkgdata/runtime-reverse/packagegroup-cross-canadian-qemux86
 Matched in b'manifest-x86_64_x86_64-nativesdk-packagegroup-cross-canadian-qemux86.packagedata'
Please verify which recipe should provide the above files.
The build has stopped as continuing in this scenario WILL break things, if not now, possibly in the future (we've seen builds fail several months later). If the system knew how to recover from this automatically it would however there are several different scenarios which can result in this and we don't know which one this is. It may be you have switched providers of something like virtual/kernel (e.g. from linux-yocto to linux-yocto-dev), in that case you need to execute the clean task for both recipes and it will resolve this error. It may be you changed DISTRO_FEATURES from systemd to udev or vice versa. Cleaning those recipes should again resolve this error however switching DISTRO_FEATURES on an existing build directory is not supported, you should really clean out tmp and rebuild (reusing sstate should be safe). It could be the overlapping files detected are harmless in which case adding them to SSTATE_DUPWHITELIST may be the correct solution. It could also be your build is including two different conflicting versions of things (e.g. bluez 4 and bluez 5 and the correct solution for that would be to resolve the conflict. If in doubt, please ask on the mailing list, sharing the error and filelist above.
ERROR: packagegroup-cross-canadian-qemux86-1.0-r0 do_packagedata: If the above message is too much, the simpler version is you're advised to wipe out tmp and rebuild (reusing sstate is fine). That will likely fix things in most (but not all) cases.
ERROR: packagegroup-cross-canadian-qemux86-1.0-r0 do_packagedata: Function failed: sstate_task_postfunc
ERROR: Logfile of failure stored in: /projects/00084758_lx9_0015_qemux86_prj/build/tmp/work/x86_64-nativesdk-mingw32-wrlinuxsdk-mingw32/packagegroup-cross-canadian-qemux86/1.0-r0/temp/log.do_packagedata.106256
ERROR: Task (/projects/00084758_lx9_0015_qemux86_prj/layers/oe-core/meta/recipes-core/packagegroups/packagegroup-cross-canadian.bb:do_packagedata) failed with exit code '1'

To build different SDKs was possible in WRL8 and below.

Workaround

Use two different build directories.  You can use the same configuration in both build directories.  It's recommended you share the DL_DIR and SSTATE_DIR settings between the two to save time.

This will avoid the issue where the tmp directory ends up with both Linux and mingw binaries in the same location, triggering the fault.

Using a single shared state directory for both projects will allow the system to avoid rebuilding software that one or the other project has already built.

alternatively

If you delete tmp dir it will work.  The system will use the existing sstate-cache files to extract and recreate the tmp directory, saving significant time from compilation.

Steps to Reproduce

$ git clone --branch WRLINUX_9_LTS_CVE https://windshare.windriver.com/remote.php/gitsmart/WRLinux-9-LTS-CVE/wrlinux-9
$ ./wrlinux-9/setup.sh --machines qemux86 --layers meta-mingw meta-mingw-dl 
$ . environment-setup-x86_64-wrlinuxsdk-linux 
$ . oe-init-build-env

$ vim conf/local.conf 

BB_NO_NETWORK ?= '0'
DISTRO ?= "wrlinux"
PACKAGE_CLASSES ?= "package_ipk"

$ SDKMACHINE=x86_64 MACHINE=qemux86 bitbake -c populate_sdk wrlinux-image-glibc-std
$ SDKMACHINE="x86_64-mingw32" MACHINE=qemux86 bitbake -c populate_sdk wrlinux-image-glibc-std

Other Downloads


Live chat
Online