<div dir="ltr">This fails on the AB when generating a eSDK, eg <a href="http://errors.yoctoproject.org/Errors/Details/110635/">http://errors.yoctoproject.org/Errors/Details/110635/</a><div><br></div><div>I suspect the cause is that the sstate is generated using the (eg) universal-4.9 name, but populate_sdk_ext still uses just &quot;universal&quot; when creating a mirror of the sstate archive.</div><div><br></div><div>Ross</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 November 2016 at 08:11, Ed Bartosh <span dir="ltr">&lt;<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">ed.bartosh@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Some c++ libraries fail to build if uninative is built<br>
with gcc 5.x and host gcc version is either 4.8 or 4.9.<br>
<br>
The issue should be solved by making separate uninative sstate<br>
directory structure sstate-cache/universal-&lt;gcc version&gt; for host gcc<br>
versions 4.8 and 4.9. This causes rebuilds of uninative if host gcc<br>
is either 4.8 or 4.9 and it doesn&#39;t match gcc version used to build<br>
uninative.<br>
<br>
[YOCTO #10441]<br>
<br>
Signed-off-by: Ed Bartosh &lt;<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>&gt;<br>
---<br>
 meta/classes/uninative.bbclass | 16 +++++++++++++++-<br>
 1 file changed, 15 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/meta/classes/uninative.<wbr>bbclass b/meta/classes/uninative.<wbr>bbclass<br>
</span>index 89cec07..3862b31 100644<br>
<span class="">--- a/meta/classes/uninative.<wbr>bbclass<br>
+++ b/meta/classes/uninative.<wbr>bbclass<br>
@@ -95,11 +95,25 @@ python uninative_event_enable() {<br>
     enable_uninative(d)<br>
 }<br>
<br>
+def gcc_version(d):<br>
+    compiler = d.getVar(&quot;BUILD_CC&quot;, True)<br>
+    retval, output = oe.utils.getstatusoutput(&quot;%s --version&quot; % compiler)<br>
+    if retval:<br>
+        bb.fatal(&quot;Error running %s --version: %s&quot; % (compiler, output))<br>
+<br>
+    import re<br>
</span>+    match = re.match(&quot;.* (\d\.\d)\.\d.*&quot;, output.split(&#39;\n&#39;)[0])<br>
<div class="HOEnZb"><div class="h5">+    if not match:<br>
+        bb.fatal(&quot;Can&#39;t get compiler version from %s --version output&quot; % compiler)<br>
+<br>
+    version = match.group(1)<br>
+    return &quot;-%s&quot; % version if version in (&quot;4.8&quot;, &quot;4.9&quot;) else &quot;&quot;<br>
+<br>
 def enable_uninative(d):<br>
     loader = d.getVar(&quot;UNINATIVE_LOADER&quot;, True)<br>
     if os.path.exists(loader):<br>
         bb.debug(2, &quot;Enabling uninative&quot;)<br>
-        d.setVar(&quot;NATIVELSBSTRING&quot;, &quot;universal&quot;)<br>
+        d.setVar(&quot;NATIVELSBSTRING&quot;, &quot;universal%s&quot; % gcc_version(d))<br>
         d.appendVar(&quot;<wbr>SSTATEPOSTUNPACKFUNCS&quot;, &quot; uninative_changeinterp&quot;)<br>
         d.prependVar(&quot;PATH&quot;, &quot;${STAGING_DIR}-uninative/${<wbr>BUILD_ARCH}-linux${bindir_<wbr>native}:&quot;)<br>
<br>
--<br>
2.1.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br></div>