<?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>8826</bug_id>
          
          <creation_ts>2015-12-17 05:39:18 +0000</creation_ts>
          <short_desc>Failed to run devtool for ext_sdk on i686 host</short_desc>
          <delta_ts>2016-02-03 07:17:22 +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>2.1</version>
          <rep_platform>x86</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>1.4.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>ke.zou</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Yi Zhao">yi.zhao</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</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>57318</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-12-17 05:39:18 +0000</bug_when>
    <thetext>Git rev: master/5e3e2e0cbb0a49986f4653e64c4c8d2b5461645e

Build Host: Fedora 23 i686
Test Host: Fedora 23 i686 and Debian 8 i686

Steps:
1. bitbake core-image-sato -c populate_sdk_ext
2. Install the poky-glibc-x86_64-core-image-sato-ppc7400-toolchain-ext-2.0+snapshot.sh and setup the environment
3. Run devtool

Error message:
###########
$ devtool --help
ImportError: No module named site
###########</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57327</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-12-17 10:06:43 +0000</bug_when>
    <thetext>First question - did it actually install successfully?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57368</commentid>
    <comment_count>2</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2015-12-18 02:00:52 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; First question - did it actually install successfully?

You are right, actually it didn&apos;t install successfully. I checked the preparing_build_system.log:

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

You can now run &apos;bitbake &lt;target&gt;&apos;

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

You can also run generated qemu images with a command like &apos;runqemu qemux86&apos;
Parsing recipes..done.
Created bbappend /buildarea/poky_sdk/workspace/appends/core-image-sato.bbappend
WARNING: Host distribution &quot;Fedora-23&quot; has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache...done.
Loaded 1311 entries from dependency cache.
Parsing recipes...done.
Parsing of 888 .bb files complete (887 cached, 1 parsed). 1310 targets, 69 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = &quot;1.28.0&quot;
BUILD_SYS         = &quot;i686-linux&quot;
NATIVELSBSTRING   = &quot;SDK-Fixed&quot;
TARGET_SYS        = &quot;mips-poky-linux&quot;
MACHINE           = &quot;qemumips&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.0+snapshot-20151216&quot;
TUNE_FEATURES     = &quot;o32 bigendian fpu-hard mips32r2&quot;
TARGET_FPU        = &quot;&quot;
meta    
meta-yocto    
meta-yocto-bsp    
workspace         = &quot;&lt;unknown&gt;:&lt;unknown&gt;&quot;

Traceback (most recent call last):
  File &quot;/buildarea/poky_sdk/tmp/sysroots/relocate_sdk.py&quot;, line 218, in &lt;module&gt;
    perms = os.stat(e)[stat.ST_MODE]
OSError: [Errno 2] No such file or directory: &apos;/buildarea/poky_sdk/tmp/sysroots/i686-linux/lib/ld-linux-x86-64.so.2&apos;
(&apos;__init__() takes at least 3 arguments (1 given)&apos;, &lt;class &apos;subprocess.CalledProcessError&apos;&gt;, ()) 
Summary: There was 1 WARNING message shown.

#############################</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57394</commentid>
    <comment_count>3</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2015-12-18 19:09:04 +0000</bug_when>
    <thetext>Is this a typo?:
poky-glibc-x86_64-core-image-sato-ppc7400-toolchain-ext-2.0+snapshot.sh
On an i686 system I would expect 
poky-glibc-i686-core-image-sato-ppc7400-toolchain-ext-2.0+snapshot.sh
(which I observed on my Fedora23 i686 system).

Anyway, I don&apos;t think there is a reason for a 64 bit loader (ld-linux-x86-64.so.2) being present on a 32 bit system, so the loader missing is probably not a bug. (ld-linux.so.2 should be used instead)

I could reproduce the problem with the commit 5e3e2e0cbb0a49986f4653e64c4c8d2b5461645e.

Seems like a relocation error. I will try to reproduce with the current master (and
sprinkle relocate_sdk.py with some debug messages.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57398</commentid>
    <comment_count>4</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2015-12-18 23:28:59 +0000</bug_when>
    <thetext>So using the master (f1f3716776078d68bd9e3734bca881a486dc2ea3) and 

$ bitbake core-image-minimal -c populate_sdk_ext

I successfully installed:

$ ./poky-glibc-i686-core-image-minimal-i586-toolchain-ext-2.0+snapshot.sh

There were no problems, and also relocate_sdk.py output shows the passed arguments (I added some printouts):

new_prefix = /home/juro/poky-sdk3/tmp/sysroots/i686-linux
new_dl_path = /home/juro/poky-sdk3/tmp/sysroots/i686-linux/lib/ld-linux.so.2
exec_list: [&apos;/home/juro/poky-sdk3/tmp/sysroots/i686-linux/lib/ld-linux.so.2&apos;, &apos;/home/juro/poky-sdk3/tmp/sysroots/i686-linux/usr/bin/patchelf-uninative&apos;]

and also 

$ devtool --help

behaves correctly.

I will still re-run these tests with the original problem settings (core-image-sato, qemuppc).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57399</commentid>
    <comment_count>5</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2015-12-18 23:42:49 +0000</bug_when>
    <thetext>I believe the problem was fixed by the commit:

a5dd1dd8904c62ef0ca5c208f997453e77860add

uninative.bbclass: Choose the correct loader based on BUILD_ARCH</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57400</commentid>
    <comment_count>6</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2015-12-18 23:48:37 +0000</bug_when>
    <thetext>The issue has been fixed and is explained, so I&apos;m closing this bug report.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58480</commentid>
    <comment_count>7</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2016-02-03 07:17:22 +0000</bug_when>
    <thetext>Verified with 2.1_M2 (master/3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>