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.
First of all, you said:
This is really really NOT recommended. It is not recommended to modify community and core layers directly, even if you are creating another separate
.bbappendfile.If you want to update
PACKAGECONFIGoflibgpiodyou can create thebbappendfile in a custom layer:This will create a
bbappendfile for your, then putPACKAGECONFIGin it.If you don't want that, just set it in
local.conf:Now, goind back to the real issue here.
libpiodprovides multiple packages:libgpiodcontaininglibgpiod.so*fileslibgpiod-devcontaining/usr/includefor the header files and/usr/libfor the shared lib'ssolinkfile and correspondingpkgconfigmetadata.libgpiod-toolscontaininggpiodetect,gpioget, ...If you add
libgpiodonly toIMAGE_INSTALL, you will get only the shared libraries. Since you said that the tools are already there, it means somewhere somehowlibgpiod-toolsis getting added.You propably need:
EDIT on how to check packages contents:
To know the content of all packages created by
libgpiodrecipe run: