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

Mikko Rapeli


(lets keep this on the list too)

On Wed, Feb 19, 2020 at 04:51:18PM +0100, Armando Hernandez wrote:
Hi Mikko,

Thanks for your reply. I checked your suggestion but does not work for me.
I did included a .bbappend file in which I:

- re-set EXTRA_OECMAKE to an empty string (i.e. ""). - my intention was
to pass no arguments when building the nativesdk. Now I know that this
accion overwrites the value of EXTRA_OECMAKE in the original .bb file
- added the line BBCLASSEXTEND = "nativesdk" to this new .bbappend file
- added the line DEPENDS_class-target += "systemd" to the original .bb

I found out that this configures both the target and the nativesdk
libraries without systemd - which later on causes a failure when bitbake
attempts to pull up everything to create the final image.

Basically, I'd like to find a way to unset or overwrite the following
variables when building the nativesdk package:

You can add _class-[target|native|nativesdk] to all variables
to override defaults.

Verify with "bitbake -e".

Hope this helps,


Is it possible to do so? Or do I come up with another recipe of the sama
package exclusively for the nativesdk?

Thanks again.

Armando Hernandez

On Wed, Feb 19, 2020 at 10:44 AM <> 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.