<?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>10566</bug_id>
          
          <creation_ts>2016-11-01 16:10:19 +0000</creation_ts>
          <short_desc>populate_sdk_ext: uninative.bbclass is a must</short_desc>
          <delta_ts>2016-11-30 17:16:24 +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>core</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 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Juan Ramos">juan.fernandox.ramos.frayle</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>67822</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-11-01 16:10:19 +0000</bug_when>
    <thetext>If uninative is not in INHERIT, there will be a lot of warnings like the following when install the ext sdk:
WARNING: The quilt-native:do_configure sig is computed to be 2be53622b8c5b6e8156053bfa5fdd825, but the sig is locked to 1dea2d1ace9b9bea1e9564b9c6709b40 in SIGGEN_LOCKEDSIGS_t-x86-64
The quilt-native:do_compile sig is computed to be 71aeabc1dc38d575e8d4a52e1c8d1f07, but the sig is locked to 29116ced7d8dd7f44435df0bbb1b2f27 in SIGGEN_LOCKEDSIGS_t-x86-64
The quilt-native:do_install sig is computed to be 1a741cd3eff119e3dd1c0f085c1df589, but the sig is locked to 490303612172994c44d6f6245c2b0a7c in SIGGEN_LOCKEDSIGS_t-x86-64
The quilt-native:do_populate_sysroot sig is computed to be 598615a6dee5023311f9860759f73af4, but the sig is locked to 3a422026a617d3a3df48813cb588bc3b in SIGGEN_LOCKEDSIGS_t-x86-64

The bitbake-diffsigs shows that the difference is caused by
BUILD_CXXFLAGS&apos;s -D_GLIBCXX_USE_CXX11_ABI=0 which is added by 
uninative.bbclass. This is because INHERIT += &quot;uninative&quot; is in
extracted ext sdk&apos;s conf/local.conf.

And when do build in the ext sdk fater extracted:
ERROR: quilt-native-0.64-r0 do_configure: Taskhash mismatch 2be53622b8c5b6e8156053bfa5fdd825 versus 1dea2d1ace9b9bea1e9564b9c6709b40 for /buildarea/lyang1/sdk_ext2/layers/oe-core/meta/recipes-devtools/quilt/quilt-native_0.64.bb.do_configure
ERROR: Taskhash mismatch 2be53622b8c5b6e8156053bfa5fdd825 versus 1dea2d1ace9b9bea1e9564b9c6709b40 for /buildarea/lyang1/sdk_ext2/layers/oe-core/meta/recipes-devtools/quilt/quilt-native_0.64.bb.do_configure

If we patch meta/classes/populate_sdk_ext.bbclass to remove uninative:

diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 0f0525d..af2680d 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -284,8 +284,11 @@ python copy_buildsystem () {
 
             f.write(&apos;DL_DIR = &quot;${TOPDIR}/downloads&quot;\n&apos;)
 
-            f.write(&apos;INHERIT += &quot;%s&quot;\n&apos; % &apos;uninative&apos;)
-            f.write(&apos;UNINATIVE_CHECKSUM[%s] = &quot;%s&quot;\n\n&apos; % (d.getVar(&apos;BUILD_ARCH&apos;, True), uninative_checksum))
+            # Don&apos;t inherit uninative if the build isn&apos;t using it
+            if bb.data.inherits_class(&apos;uninative&apos;, d):
+                f.write(&apos;INHERIT += &quot;%s&quot;\n&apos; % &apos;uninative&apos;)
+                f.write(&apos;UNINATIVE_CHECKSUM[%s] = &quot;%s&quot;\n\n&apos; % (d.getVar(&apos;BUILD_ARCH&apos;, True), uninative_checksum))
+
             f.write(&apos;CONF_VERSION = &quot;%s&quot;\n\n&apos; % d.getVar(&apos;CONF_VERSION&apos;, False))
 
             # Some classes are not suitable for SDK, remove them from INHERIT

This still can&apos;t fix the problem, there would be strange errors during install ext sdk:

NOTE: Executing RunQueue Tasks
ERROR: Task quilt-native.do_fetch attempted to execute unexpectedly
ERROR: Task quilt-native.do_unpack attempted to execute unexpectedly
ERROR: Task quilt-native.do_patch attempted to execute unexpectedly
ERROR: Task quilt-native.do_configure attempted to execute unexpectedly
ERROR: Task quilt-native.do_compile attempted to execute unexpectedly
ERROR: Task quilt-native.do_install attempted to execute unexpectedly

This is because nativesdk tools can&apos;t run:

$ ls ./sysroots/x86_64-wrlinuxsdk-linux/usr/bin/file.real
./sysroots/x86_64-wrlinuxsdk-linux/usr/bin/file.real

$ ./sysroots/x86_64-wrlinuxsdk-linux/usr/bin/file.real
bash: ./sysroots/x86_64-wrlinuxsdk-linux/usr/bin/file.real: No such file or directory

I think that we need add checking in meta/classes/populate_sdk_ext.bbclass to check whether uninative.bbclass is inherited, and error out if not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67849</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-02 02:22:49 +0000</bug_when>
    <thetext>I tried to make it not break without uninative - since uninative is only enabled by default in poky but not OE-Core&apos;s default configuration - but we might as well give up on that idea. It&apos;ll be slightly more difficult for users unfortunately, but it seems we&apos;ve painted ourselves into a corner.

I have a patch here to make do_populate_sdk_ext error out immediately in case uninative is not inherited.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67850</commentid>
    <comment_count>2</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-11-02 02:32:21 +0000</bug_when>
    <thetext>Thanks Paul, I re-assign the bug to you. Errors out immediately will make our lives easier:-).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68116</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-11-08 17:27:23 +0000</bug_when>
    <thetext>Fixed in oe-core b59eee7bebd413c7abe5626f69508e1fe47dd0ac.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68472</commentid>
    <comment_count>4</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-21 23:04:20 +0000</bug_when>
    <thetext>There&apos;s been some further discussion - we are going to try to change the native configuration so that the eSDK can work in the default OE-Core configuration, see Richard&apos;s email:

http://lists.openembedded.org/pipermail/openembedded-architecture/2016-November/000324.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68693</commentid>
    <comment_count>5</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-11-29 18:55:18 +0000</bug_when>
    <thetext>This is now resolved as of the following two commits:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5fd4cada2e49a0a12f54b8e37b7f18c44101457f
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=71b7c3a88ec5a20d5e4531751d0bf23d5c94e494</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68746</commentid>
    <comment_count>6</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-11-30 17:16:24 +0000</bug_when>
    <thetext>*** Bug 10645 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>