<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11298</bug_id>
          
          <creation_ts>2017-04-05 18:18:46 +0000</creation_ts>
          <short_desc>RefKit: eSDK toolchain environment variables have incorrect path</short_desc>
          <delta_ts>2017-04-18 18:21:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>IoT Reference OS Kit</product>
          <component>intel-iot-refkit-tools</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Mikko Ylinen">mikko.ylinen</assigned_to>
          <cc>bluelightning</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>72103</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-04-05 18:18:46 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72126</commentid>
    <comment_count>1</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-06 11:31:51 +0000</bug_when>
    <thetext>(In reply to comment #0)

&gt; 
&gt; Environment variables reference /home/hbruce/refkit-sdk/tmp/sysroots
&gt; Should be /home/hbruce/refkit-sdk/tmp-glibc/sysroots


Does it work with poky? that &apos;tmp&apos; part is hardcoded in meta-environment-extsdk.bb (OE-Core 4fe60d526a94f30b201c434994e80fef0f7392f0).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72175</commentid>
    <comment_count>2</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-07 12:47:34 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; 
&gt; &gt; 
&gt; &gt; Environment variables reference /home/hbruce/refkit-sdk/tmp/sysroots
&gt; &gt; Should be /home/hbruce/refkit-sdk/tmp-glibc/sysroots
&gt; 
&gt; 
&gt; Does it work with poky? that &apos;tmp&apos; part is hardcoded in
&gt; meta-environment-extsdk.bb (OE-Core
&gt; 4fe60d526a94f30b201c434994e80fef0f7392f0).

Seems it works with poky esdk. For some reason &apos;tmp&apos; exists while for refkit the default &apos;tmp-glibc&apos; remains.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72189</commentid>
    <comment_count>3</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-04-07 18:18:36 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72199</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-04-09 22:01:43 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72374</commentid>
    <comment_count>5</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-12 09:16:23 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; FYI we are supposed to be forcing ${TOPDIR}/tmp to be the value as per:
&gt; 
&gt; http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/
&gt; ?id=785bec81ef75878749bd3a7a355bbd6aab16a198

ext-sdk-prepare.py still gets TMPDIR as &apos;tmp-glibc&apos;.

Looks like defaultsetup.conf mangles TMPDIR still:

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

poky has TCLIBCAPPEND=&quot;&quot; so it works but we don&apos;t touch that.

Looks like TCLIBCAPPEND needs to be set to &quot;&quot; in populate_sdk_ext.bbclass if we want to force static &apos;tmp&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72476</commentid>
    <comment_count>6</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-13 15:33:21 +0000</bug_when>
    <thetext>Patch submitted:
http://lists.openembedded.org/pipermail/openembedded-core/2017-April/135659.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72609</commentid>
    <comment_count>7</comment_count>
    <who name="Mikko Ylinen">mikko.ylinen</who>
    <bug_when>2017-04-18 18:21:21 +0000</bug_when>
    <thetext>Fixes available in the repo</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>