[yocto] static libraries missing from sdk

Mircea Gliga mircea.gliga at vitheia.com
Fri Feb 9 04:18:09 PST 2018


Hi


 > I am not sure it makes sense to build and add both the static and 
dynamic libs to an SDK.
The idea is that I want everything that is needed to build the app in 
the SDK and I don't want to individually specify what goes in because 
it's error prone and you can forget something.
Some pkgs could have dynamic libs other could have static libs ...

See below further comments.
Thanks for your help!

On 07/02/18 20:56, Robert Berger wrote:
> Hi,
>
> I played around a bit with my autotooled lib, which produces only a 
> static lib.
>
> 1) My preferred approach is this:
>
> I add to local.conf:
>
> TOOLCHAIN_TARGET_TASK_append = " libhw-a-staticdev libhw-a-dev"
>
> The recipe looks like this:
>
> https://pastebin.com/YLUvQSSx
>
> 2) But your approach works as well:
>
> I add to local.conf:
>
> # we need to add the empty package to the rootfs for
> # IMAGE_FEATURES_append to work:
> IMAGE_INSTALL_append = " libhw-a"
That's what I've been missing... I need to add the empty main pkg in the 
image and then the static library ends up in the SDK - because the SDK 
it's build upon the image...
It's not a perfect scenario... First you have to create the empty main 
pkg using ALLOW_EMPTY then install the empty pkg in the image...

> # add all -dev, -dbg, -staticdev pkgs to the SDK (only):
> SDKIMAGE_FEATURES_append = " dev-pkgs dbg-pkgs staticdev-pkgs"
>
> The recipe looks like this:
> (needed to slightly modify my original recipe)
>
> https://pastebin.com/VcsqNuMf
>
> On the rootfs there is nothing with respect to this recipe.
>
> In the SDK are:
> ./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/lib/libhw.a
> ./opt/poky/2.4/sysroots/armv7a-neon-poky-linux-gnueabi/usr/include/lib_hw.h 
>
>
> Regards,
>
> Robert
>




More information about the yocto mailing list