[yocto] Getting build dependencies correct

Jussi Kukkonen jussi.kukkonen at intel.com
Mon Feb 13 02:09:24 PST 2017


On 13 February 2017 at 08:02, Gary Thomas <gary at mlbassoc.com> wrote:

> I'm trying to work with a new tool that creates executables
> for my target.  This tool has a shared library and some include
> files.  What I need to figure out is how to run the tool in my
> build environment such that it uses those files to create an
> executable for my target board.
>
> The tool is created by some recipe xxx.  I have enabled both
> the target version and the xxx-native version (using BBCLASSEXTEND)
> and end up with these files in the tmp/sysroots
>
> gthomas at europa:p8701_2016-10-22$ find tmp/sysroots-components/armv7a
> hf-neon/am335x-pru-support
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/sysroot-providers
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/
> sysroot-providers/am335x-pru-support
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/usr
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/usr/lib
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/
> usr/lib/libprussdrv.so.0
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/
> usr/lib/libprussdrv.so.0.0
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/usr/include
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/usr/include/pruss
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/
> usr/include/pruss/pruss_intc_mapping.h
> tmp/sysroots-components/armv7ahf-neon/am335x-pru-support/
> usr/include/pruss/prussdrv.h
> gthomas at europa:p8701_2016-10-22$ find tmp/sysroots-components/x86_64
> /am335x-pru-support-native/
> tmp/sysroots-components/x86_64/am335x-pru-support-native/
> tmp/sysroots-components/x86_64/am335x-pru-support-native/sysroot-providers
> tmp/sysroots-components/x86_64/am335x-pru-support-native/sys
> root-providers/am335x-pru-support-native
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr/lib
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr
> /lib/libprussdrv.so.0
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr
> /lib/libprussdrv.so.0.0
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr/include
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr/include/pruss
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr
> /include/pruss/pruss_intc_mapping.h
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr
> /include/pruss/prussdrv.h
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr/bin
> tmp/sysroots-components/x86_64/am335x-pru-support-native/usr/bin/pasm
>
> The question becomes how to make use of this in a separate recipe
> that wants to use both the 'pasm' tool, as well as the include files
> and library from the 'pruss' support.
>
> I tried to use
>   DEPENDS="am335x-pru-support"
> as well as
>   DEPENDS="am335x-pru-support-native"
> in my recipe, but the correct sysroot is never found (e.g.
> <pruss/prussdrv.h>
> is not in my search path).
>

You should probably depend on both: am335x-pru-support-native because you
want to run the binary, am335x-pru-support because if want to get the
target library to link with.

You should check the actual  recipe sysroots in WORKDIR/recipe-sysroot* to
see what is available during the build.

- Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170213/38e617a9/attachment.html>


More information about the yocto mailing list