Archiwum | CMake RSS for this section

Yocto ERROR: QA issue : package XXXX rdepends on XXXX-dev

I am working on embedded Linux application for months. Usually I’m using QT Creator’s „deploy” feature to run tests, or start whole application on remote device.

Sometimes I’m rebuilding whole Yocto image. Just to be sure, that everything is all right.

Couple of weeks ago I decided to divide my application in number of shared object (.so) files.

My QtCreator deploy workflow worked perfectly, but when I tried to build whole image, bitbake returned weird error:

ERROR: QA issue : package XXXX rdepends on XXXX-dev

I have no idea about „-dev” package. After some googling, I found quick and dirty hack.

Add to recipe:

INSANE_SKIP_${PN} += "dev-so"

Build image:

bitbake core-image-minimal

And working image is ready.

But image size is much larger then I expect.

After some investigation, apparently Yocto decided to add all kernel header files to image. That’s bad. Every megabyte is precious on embedded systems.

So, I had to find better solution.

After digging through documentation, finally i understand what the problem is.

Yocto (or OpenEmbedded) is checking package binary files. When .so file(s) are detected, it checks for symbolic links to those files. Symlinks are used to deal with different .so versions.

Check this article for details: http://www.tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html

When symlinks are not found, this weird and not helpful QA error is generated.

Problem fixing is trivial.

I’m using CMake. All I have to, is do add this line to my library CMakeLists.txt file:

set_target_properties (libname  PROPERTIES VERSION 1.0 SOVERSION 1)

That’s it. CMake will generate symlinks.