That sounds like a bug but your fix isn't complete (doesn't handle perl-native, for example), so the script should find the *-native directories itself. I've filed https://bugzilla.yoctoproject.org/show_bug.cgi?id=12889 so this doesn't get lost.
Ross On 10 August 2018 at 16:58, Aaron Cohen <aa...@assonance.org> wrote: > Trying to run bmaptool on Centos 7, oe-run-native using the command > "oe-run-native bmap-tools-native bmaptool copy -h" gives the following > error: > > --- a/scripts/oe-run-nativeTraceback (most recent call last): > File > "/home/joel-cohen/code/yocto-2.5/xilinx-build/tmp/work/x86_64-linux/bmap-tools-native/3.4-r0/recipe-sysroot-native/usr/bin/bmaptool", > line 6, in <module> > from pkg_resources import load_entry_point > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3007, in > <module> > working_set.require(__requires__) > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 728, in > require > needed = self.resolve(parse_requirements(requirements)) > File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in > resolve > raise DistributionNotFound(req) > pkg_resources.DistributionNotFound: bmap-tools==3.4 > > which is caused because the python3 that it is using is my host's old > version (3.4.8) rather than from the recipe sysroot. > > The following patch fixes it for me, but I wonder if there's a better > solution. I do think that finding the sysroot python3 is in general > preferable to using whatever happens to be on the host... > > A side note: the bmaptool currently in oe throws a weird error when given no > arguments rather than a usage message. This has been fixed upstream. > > --Aaron > > +++ b/scripts/oe-run-native > @@ -55,7 +55,7 @@ fi > OLD_PATH=$PATH > > # look for a tool only in native sysroot > -PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin > +PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$OECORE_NATIVE_SYSROOT/bin:$OECORE_NATIVE_SYSROOT/usr/sbin:$OECORE_NATIVE_SYSROOT/sbin:$OECORE_NATIVE_SYSROOT/usr/bin/python3-native > tool_find=`/usr/bin/which $tool 2>/dev/null` > > if [ -n "$tool_find" ] ; then > > > -- > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto > -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto