Bug 10210 - Setting TMPDIR breaks ESDK generation
Summary: Setting TMPDIR breaks ESDK generation
Status: RESOLVED FIXED
Alias: None
Product: eSDK
Classification: Yocto Project Subprojects
Component: eSDK (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.2 M4
Assignee: Paul Eggleton
QA Contact: Francisco Pedraza
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-02 09:00 UTC by Richard Purdie
Modified: 2016-09-14 22:10 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Purdie 2016-09-02 09:00:01 UTC
If I set:

DISTRO = "poky-lsb"
TMPDIR = "${TOPDIR}/tmp-lsb"

then I:

bitbake core-image-minimal -c populate_sdk_ext
bitbake core-image-minimal -c testsdkext

I see the error:

ERROR: core-image-minimal-1.0-r0 do_testsdkext: Couldn't install the extensible SDK:
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.1+snapshot
===================================================================================
You are about to install the SDK to "/media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc". Proceed[Y/n]? Y
Extracting SDK............................................................................................done
Setting it up...
Extracting buildtools...
Preparing build system...
ERROR: SDK preparation failed: error log written to /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc/preparing_build_system.log


Contents of preparing_build_system.log:

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
Preparing SDK for core-image-minimal, meta-extsdk-toolchain:do_populate_sysroot...
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, TMPDIR has changed location. You need to either move it back to /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/tmp or rebuild


ERROR: core-image-minimal-1.0-r0 do_testsdkext: Function failed: do_testsdkext
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/log.do_testsdkext.41071
ERROR: Task (/media/build1/poky/meta/recipes-core/images/core-image-minimal.bb:do_testsdkext) failed with exit code '1'

which seems to be because there is a tmp/ directory left in the SDK which isn't otherwise there. I suspect the TMPDIR setting interferes with the SDK generation somehow.
Comment 1 Richard Purdie 2016-09-02 09:15:07 UTC
I suspect the problem is     cleanpaths.append(os.path.basename(d.getVar('TMPDIR', True))) in clean_esdk_builddir() since this needs to be the version with local.conf modifications excluded, not the current build value.