Re: how to reuse generated library in a nativesdk recipe #sdk #systemd

Mikko Rapeli

On Wed, Feb 19, 2020 at 10:57:41PM +0100, Martin Jansa wrote:
DEPENDS_class-target += "systemd"
You surely meant
DEPENDS_append_class-target = " systemd"
Yes, quite likely. Tough reason why += doesn't work is a mystery to me :)

I hack things until "bitbake -e" shows the right things for the recipes.


On Wed, Feb 19, 2020 at 10:48 PM Mikko Rapeli <> wrote:


On Wed, Feb 19, 2020 at 01:37:19AM -0800, Armando Hernandez wrote:

I have a recipe that builds a library. The recipe specifies an
additional package "${PN}-systemd" along with other systemd related
variables and finally it instructs that the package should be built with
"-DWITH_SYSTEMD=ON" being passed to cmake. So far so good. But, I extended
this recipe to nativesdk because I need this library on it. When trying to
build the corresponding nativesdk package, the build fails at the
configuration step (i.e. "do_configure") claiming it cannot find the
package systemd.

Is there a way I can install the -already-generated libraries into my
SDK (potentially via the corresponding nativesdk recipe) without having to
rebuild the package? Or do I need to somehow include such systemd package
in my sdk (which I don't think I need at all)?

Any hints and pointers as to were to look at are very well appreciated.
Make the systemd dependency for target only, e.g. DEPENDS_class-target +=

There may be relevant use cases to build some of systemd components or
to native or nativesdk targets too. In that case add BBCLASSEXTEND +=
"nativesdk" etc
in a bbappend to systemd.

Hope this helps,


Join to automatically receive all group messages.