minhix
minhix

Reputation: 31

How to (force Yocto to) create ${PN}.deb file?

I'm trying to add a library (a cmake project) to my Yocto project/image.

The package essentially consists of one static library (named hello.a) with some header files in C.

I wrote a recipe and could configure, compile, package it.

The packaging results are four files {hello-dbg, hello-dev, hello-src, hello-staticdev}.deb

So there is no hello.deb.

And that seems to be a problem preventing me to create image.

The following packages have unmet dependencies:
 packagegroup-utils-extra : Depends: hello but it is not installable
E: Unable to correct problems, you have held broken packages.

When I try to add that by defining:

FILES_${PN} += "/usr/lib/hello.a"

bitbake does not allow adding static libraries to anything but staticdev -> so that does not work.

My question is then, as the title says, how to (force Yocto to) create ${PN}.deb file?

Upvotes: 0

Views: 409

Answers (1)

Tomas Novotny
Tomas Novotny

Reputation: 1929

The empty packages (i.e. containing no files) are not created by default. If you want to override it, you can do it via the ALLOW_EMPTY variable for a package like this:

ALLOW_EMPTY:${PN} = "1"

You can also check the official documentation for ALLOW_EMPTY.

Just for clarification:

  • You can install the ${PN} package (it won't install any file on the target system).
  • As before, your static library will still be shipped in the ${PN}-staticdev package.

Upvotes: 1

Related Questions