<div dir="ltr">On Thu, Aug 16, 2018 at 10:45 AM Jagadeesh Krishnanjanappa <<a href="mailto:jkrishnanjanappa@mvista.com">jkrishnanjanappa@mvista.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It helps to find/use native tools under ${STAGING_BINDIR_NATIVE}/*-native.<br>
<br>
Solving below error:<br>
<br>
$ oe-run-native python3-native python3<br>
Running bitbake -e python3-native<br>
Error: Unable to find 'python3' in .../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/usr/bin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/bin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/usr/sbin:.../tmp/work/x86_64-linux/python3-native/3.5.5-r1.0/recipe-sysroot-native/sbin<br>
Error: Have you run 'bitbake python3-native -caddto_recipe_sysroot'?<br>
-- snip --<br>
<br>
After this change we have native python3 to be found:<br>
<br>
$ oe-run-native python3-native python3<br>
Running bitbake -e python3-native<br>
Python 3.5.5 (default, Aug 8 2018, 17:45:49)<br>
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>><br>
-- snip --<br>
<br>
[YOCTO #12889]<br>
<br>
Signed-off-by: Jagadeesh Krishnanjanappa <<a href="mailto:jkrishnanjanappa@mvista.com" target="_blank">jkrishnanjanappa@mvista.com</a>><br>
---<br>
scripts/oe-run-native | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/scripts/oe-run-native b/scripts/oe-run-native<br>
index bbdd1d8..8412b18 100755<br>
--- a/scripts/oe-run-native<br>
+++ b/scripts/oe-run-native<br>
@@ -55,7 +55,7 @@ fi<br>
OLD_PATH=$PATH<br>
<br>
# look for a tool only in native sysroot<br>
-PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin<br>
+PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin:$(find $OECORE_NATIVE_SYSROOT/usr/bin/*-native -maxdepth 1 -type d -printf ":%p")<br></blockquote><div><br></div><div>If I'm reading this right, this will leave an empty entry in PATH if no -native subdirectories are found, which is harmful. I'd suggest reworking that.<br></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div></div>