Package is not properly installed in Yocto

247 views Asked by At

I'm building a custom Linux image with yocto and I'm attemping to add "libgpiod" package to the image built. The libgpiod recipe is located at

project/sources/meta-openembedded/meta-oe/recipes-support/libgpiod

and in the same location I have a .bbappend file that add some extra configuration. The .bbappend is just a single line of code that enables cxx bindings:

PACKAGECONFIG += "cxx"

The problem that I'm facing is that in my Linux image I'm not able to find gpiod.h nor gpiod.hpp (cxx bindings).

I know libgpiod is being compiled and added because I have the tools and the core available in the image (I can use gpiodetect that is an utility from gpiod), so I assume that yocto finds the recipe successfully.

Within my bblayers.conf file:

BBLAYERS = " \
  ${BSPDIR}/sources/poky/meta \
  ${BSPDIR}/sources/poky/meta-poky \
  \
  ${BSPDIR}/sources/meta-openembedded/meta-oe \
  ${BSPDIR}/sources/meta-openembedded/meta-multimedia \
  ${BSPDIR}/sources/meta-openembedded/meta-python \
  \
  ${BSPDIR}/sources/meta-freescale \
  ${BSPDIR}/sources/meta-freescale-3rdparty \
  ${BSP

Note: If I modify my .bbappend file to:

PACKAGECONFIG += "python3" 

It compiles and add python3 bindings to the image, so I dont know why it doesnt work with cxx.

Reference: https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/about/

Thanks!

I tried adding a .bbappend file with "cxx" configuration and it doesnt work.

1

There are 1 answers

3
Talel BELHAJSALEM On BEST ANSWER

First of all, you said:

and in the same location I have a .bbappend file that add some extra configuration

This is really really NOT recommended. It is not recommended to modify community and core layers directly, even if you are creating another separate .bbappend file.

If you want to update PACKAGECONFIG of libgpiod you can create the bbappend file in a custom layer:

bitbake-layers create-layer meta-custom
bitbake-layers add-layer meta-custom
recipetool newappend meta-custom libgpiod

This will create a bbappend file for your, then put PACKAGECONFIG in it.

If you don't want that, just set it in local.conf:

PACKAGECONFIG:append:pn-libgpiod = " cxx"

Now, goind back to the real issue here.

libpiod provides multiple packages:

  • libgpiod containing libgpiod.so* files
  • libgpiod-dev containing /usr/include for the header files and /usr/lib for the shared lib's solink file and corresponding pkgconfig metadata.
  • libgpiod-tools containing gpiodetect, gpioget, ...

If you add libgpiod only to IMAGE_INSTALL, you will get only the shared libraries. Since you said that the tools are already there, it means somewhere somehow libgpiod-tools is getting added.

You propably need:

IMAGE_INSTALL:append = " libgpiod-dev"

EDIT on how to check packages contents:

To know the content of all packages created by libgpiod recipe run:

bitbake-getvar -r libgpiod --value PKGDEST | xargs tree