Bug 10797 - ESDK can contain path to build sysroot as SDK sysroot
Summary: ESDK can contain path to build sysroot as SDK sysroot
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M2
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-12-13 00:09 UTC by Ross Burton
Modified: 2017-01-22 21:36 UTC (History)
3 users (show)

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 Ross Burton 2016-12-13 00:09:50 UTC
My TMPDIR is set to /data/poky-master/tmp-glibc.  If I build an ESDK and install to ~/poky_sdk then the environment script says this:

export SDKTARGETSYSROOT=/home/ross/poky_sdk/../../../../../data/poky-master/tmp-glibc/sysroots/intel-corei7-64

My hunch was that this is because TMPDIR isn't a subdirectory of the build directory, but rebuilding with TMPDIR under build doesn't solve the problem.  So either that isn't the cause, or the paths end up in a nativesdk package instead of being generated at sdk creation time.  Another build is running now to test this.
Comment 1 Ross Burton 2016-12-13 00:57:25 UTC
Confirmed that building from clean with default TMPDIR fixes the problem.  There's a nativesdk package somewhere that embeds the TMPDIR path in, and if this TMPDIR isn't under the build directory then the path logic explodes.
Comment 2 Paul Eggleton 2016-12-22 03:31:51 UTC
The recipe that includes this path is meta/recipes-core/meta/meta-environment-extsdk.bb. There's also a reference in meta/classes/populate_sdk_ext.bbclass (see the line setting the binrelpath variable).

The approach we've taken up to this point is to allow the default through for TMPDIR, but given that people point that to other locations that doesn't really work. We can probably fix it just by forcing TMPDIR to a known value (e.g. "${TOPDIR}/tmp" and assuming that value in meta-environment-extsdk.bb instead. We'll need to double-check that doesn't break OE-Core standalone use since that has a different default TMPDIR (though it shouldn't cause an issue there).