Bug 11298 - RefKit: eSDK toolchain environment variables have incorrect path
Summary: RefKit: eSDK toolchain environment variables have incorrect path
Status: RESOLVED FIXED
Alias: None
Product: IoT Reference OS Kit
Classification: Yocto Project Subprojects
Component: intel-iot-refkit-tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M4
Assignee: Mikko Ylinen
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-04-05 18:18 UTC by Henry Bruce
Modified: 2017-04-18 18:21 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bruce 2017-04-05 18:18:46 UTC
Steps to re-create
------------------
Build a full eSDK for refkit-image-common
$ bitbake refkit-image-common -c populate_sdk_ext
Install it
$ refkit-x86_64-corei7-64-toolchain-ext-refkit.0.sh -d home/hbruce/refkit-sdk
Configure and try to get compiler version
$ cd home/hbruce/refkit-sdk
$ source environment-setup-corei7-64-refkit-linux
$ $CC -v
bash: x86_64-refkit-linux-gcc: command not found


Environment variables reference /home/hbruce/refkit-sdk/tmp/sysroots
Should be /home/hbruce/refkit-sdk/tmp-glibc/sysroots
$ echo $PATH
/home/hbruce/refkit-sdk/sysroots/x86_64-refkitsdk-linux/usr/bin:/home/hbruce/refkit-sdk/buildtools/sysroots/x86_64-refkitsdk-linux/usr/bin:/home/hbruce/refkit-sdk/tmp/sysroots/x86_64/usr/bin:/home/hbruce/refkit-sdk/tmp/sysroots/x86_64/usr/sbin ...
$ echo $CC
x86_64-refkit-linux-gcc -m64 -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2 --sysroot=/home/hbruce/refkit-sdk/tmp/sysroots/intel-corei7-64
Comment 1 Mikko Ylinen 2017-04-06 11:31:51 UTC
(In reply to comment #0)

> 
> Environment variables reference /home/hbruce/refkit-sdk/tmp/sysroots
> Should be /home/hbruce/refkit-sdk/tmp-glibc/sysroots


Does it work with poky? that 'tmp' part is hardcoded in meta-environment-extsdk.bb (OE-Core 4fe60d526a94f30b201c434994e80fef0f7392f0).
Comment 2 Mikko Ylinen 2017-04-07 12:47:34 UTC
(In reply to comment #1)
> (In reply to comment #0)
> 
> > 
> > Environment variables reference /home/hbruce/refkit-sdk/tmp/sysroots
> > Should be /home/hbruce/refkit-sdk/tmp-glibc/sysroots
> 
> 
> Does it work with poky? that 'tmp' part is hardcoded in
> meta-environment-extsdk.bb (OE-Core
> 4fe60d526a94f30b201c434994e80fef0f7392f0).

Seems it works with poky esdk. For some reason 'tmp' exists while for refkit the default 'tmp-glibc' remains.
Comment 3 Henry Bruce 2017-04-07 18:18:36 UTC
It looks like an eSDk bug. In meta-environment-extsdk.bb commit 4fe60d5 sets TMPDIR=${TOPDIR}/tmp, should be TMPDIR=${TOPDIR}/tmp${TCLIBCAPPEND}.

I have patch ready that works with both poky+qemu and refkit, but not sure of the testing I need to do.
Comment 4 Paul Eggleton 2017-04-09 22:01:43 UTC
FYI we are supposed to be forcing ${TOPDIR}/tmp to be the value as per:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=785bec81ef75878749bd3a7a355bbd6aab16a198
Comment 5 Mikko Ylinen 2017-04-12 09:16:23 UTC
(In reply to comment #4)
> FYI we are supposed to be forcing ${TOPDIR}/tmp to be the value as per:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
> ?id=785bec81ef75878749bd3a7a355bbd6aab16a198

ext-sdk-prepare.py still gets TMPDIR as 'tmp-glibc'.

Looks like defaultsetup.conf mangles TMPDIR still:

# Allow single libc distros to disable this code
TCLIBCAPPEND ?= "-${TCLIBC}"
TMPDIR .= "${TCLIBCAPPEND}"

poky has TCLIBCAPPEND="" so it works but we don't touch that.

Looks like TCLIBCAPPEND needs to be set to "" in populate_sdk_ext.bbclass if we want to force static 'tmp'.
Comment 7 Mikko Ylinen 2017-04-18 18:21:21 UTC
Fixes available in the repo