[yocto] -staticdev packages not in sdk
Richard Purdie
richard.purdie at linuxfoundation.org
Tue Aug 6 15:06:47 PDT 2019
On Tue, 2019-08-06 at 14:04 +0000, Koeller, Thomas wrote:
> browsing the list archives I came across an older thread that exactly
> describes the problem I am currently struggling with:
>
> https://lists.yoctoproject.org/pipermail/yocto/2018-February/039950.html
>
> In short, I have a recipe that produces only a couple of header files
> and a single static library, nothing to be installed on the target.
> So the base package is empty, which is why I have 'ALLOW_EMPTY_${PN}
> = "1"' in its recipe. In my image definition I have
> 'SDKIMAGE_FEATURES_append = " staticdev-pkgs"', so I expect the
> -staticdev package to be included when generating the SDK. This is,
> however, not the case. While a large number of -staticdev packages
> from different recipes is now included in the SDK, only the -dev
> package is included for my recipe, not the -staticdev (though the
> corresponding rpm is actually built and contains the library as
> expected, it just is not installed).
>
> The archived mail thread referenced above suggests adding the base
> package ${PN} to IMAGE_INSTALL, which indeed does work for me.
> However, I do not understand why this is necessary at all, as my
> package is already referenced from another recipe by being listed in
> that recipe's DEPENDS variable, shouldn't that be enough?
DEPENDS means its a *build* time dependency. Since nothing links to it
there is no runtime dependency generated and this empty package you've
created is never installed into the image.
If its not installed into the image, the SDK for that image won't have
the corresponding -dev package.
If you add an RDEPENDS on the empty package to something in the image,
you'll probably find the -dev package then is installed.
> Also, the -dev package gets installed into the SDK even without such
> cruft. As far as I can see, identical logic is applied to both -dev
> and -staticdev packages, so what is the difference?
>
> I also found a different workaround for the problem: listing the
> -staticdev package in TOOLCHAIN_TARGET_TASK. Needless to say, this
> workaround is just as undesirable as the former one.
Cheers,
Richard
More information about the yocto
mailing list