<?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>8698</bug_id>
          
          <creation_ts>2015-11-17 16:56:18 +0000</creation_ts>
          <short_desc>Toolchain install fails when environment has been previously sourced</short_desc>
          <delta_ts>2016-01-11 08:27:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.7.4</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</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.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="George Nita">george.nita</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>56553</commentid>
    <comment_count>0</comment_count>
    <who name="George Nita">george.nita</who>
    <bug_when>2015-11-17 16:56:18 +0000</bug_when>
    <thetext>Build for qemuarm:
bitbake -f -c populate_sdk core-image-minimal
&lt;Copy the script on host&gt;
Install SDK in a clean environment:
./poky-glibc-x86_64-core-image-minimal-armv5te-toolchain-1.7.3.sh -d toolchain1 -y
&apos;SDK has been successfully set up and is ready to be used.&apos;

source toolchain1/environment-setup-armv5te-poky-linux-gnueabi
rm -rf toolchain1/*

Try installing SDK again:
./poky-glibc-x86_64-core-image-minimal-armv5te-toolchain-1.7.3.sh -d toolchain1 -y
You are about to install the SDK to &quot;.../toolchain1&quot;. Proceed[Y/n]?Y
Extracting SDK...done
Setting it up...toolchain1/sysroots/x86_64-pokysdk-linux/usr/bin/python: line 4: .../toolchain1/sysroots/x86_64-pokysdk-linux/usr/bin/python2.7.real: No such file or directory
SDK could not be set up. Relocate script failed. Abort!

This occurred on dizzy, 1.7.3. Hosts were Ubuntu-14.04 and Ubuntu-14.04.3

The cause is that the environment no longer fits the host, but the toolchain.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56633</commentid>
    <comment_count>1</comment_count>
    <who name="George Nita">george.nita</who>
    <bug_when>2015-11-19 15:45:29 +0000</bug_when>
    <thetext>Sent a patch for it, http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113042.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56762</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-11-24 22:36:00 +0000</bug_when>
    <thetext>Thanks for the patch - I replied on the mailing list; I&apos;ve queued this up with some other fixes I will send out soon.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56776</commentid>
    <comment_count>3</comment_count>
    <who name="George Nita">george.nita</who>
    <bug_when>2015-11-25 14:28:01 +0000</bug_when>
    <thetext>Issue is reproducible on master too:
source environment-setup-armv5e-poky-linux-gnueabi
cd ..
rm -rf toolchain1/*
./poky-glibc-x86_64-core-image-minimal-armv5e-toolchain-2.0.sh -d ..../toolchain1
Poky (Yocto Project Reference Distro) SDK installer version 2.0
===============================================================
You are about to install the SDK to &quot;..../toolchain1&quot;. Proceed[Y/n]? 
Extracting SDK.....................done
Setting it up....../mastertoolchain/toolchain1/sysroots/x86_64-pokysdk-linux/usr/bin/python: line 4: .../mastertoolchain/toolchain1/sysroots/x86_64-pokysdk-linux/usr/bin/python2.7.real: No such file or directory
SDK could not be set up. Relocate script failed. Abort!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56778</commentid>
    <comment_count>4</comment_count>
    <who name="George Nita">george.nita</who>
    <bug_when>2015-11-25 15:29:50 +0000</bug_when>
    <thetext>Sent fix for master, http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113335.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56918</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-12-02 02:29:03 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=8d784baf25861161a3bdc513e2f5236c0c19710d

I&apos;ll send a backport of this to jethro along with a bunch of other backports.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57622</commentid>
    <comment_count>6</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-01-07 15:22:28 +0000</bug_when>
    <thetext>Verified on master: f8185ff9f8ac697733b41f023cb3a4b98b2f823f

yocto@yocto-PowerEdge-R720:~/yocto/BBB/build/tmp/deploy/sdk$ ./poky-glibc-x86_64-core-image-minimal-armv5e-toolchain-2.0+snapshot.sh -d toolchain1 -y
Poky (Yocto Project Reference Distro) SDK installer version 2.0+snapshot
========================================================================
You are about to install the SDK to &quot;/home/yocto/yocto/BBB/build/tmp/deploy/sdk/toolchain1&quot;. Proceed[Y/n]? Y
Extracting SDK.......................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /home/yocto/yocto/BBB/build/tmp/deploy/sdk/toolchain1/environment-setup-armv5e-poky-linux-gnueabi
yocto@yocto-PowerEdge-R720:~/yocto/BBB/build/tmp/deploy/sdk$ source toolchain1/environment-setup-armv5e-poky-linux-gnueabi
yocto@yocto-PowerEdge-R720:~/yocto/BBB/build/tmp/deploy/sdk$ rm -rf toolchain1/*
yocto@yocto-PowerEdge-R720:~/yocto/BBB/build/tmp/deploy/sdk$  ./poky-glibc-x86_64-core-image-minimal-armv5e-toolchain-2.0+snapshot.sh -d toolchain1 -y
Poky (Yocto Project Reference Distro) SDK installer version 2.0+snapshot
========================================================================
You are about to install the SDK to &quot;/home/yocto/yocto/BBB/build/tmp/deploy/sdk/toolchain1&quot;. Proceed[Y/n]? Y
Extracting SDK.......................done
Setting it up...done
SDK has been successfully set up and is ready to be used.
Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g.
 $ . /home/yocto/yocto/BBB/build/tmp/deploy/sdk/toolchain1/environment-setup-armv5e-poky-linux-gnueabi</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>