Why is a Yocto recipe being skipped? - yocto

How do I find out the reason bitbake is skipping a recipe?
If run:
>bitbake-layers show-appends
I see the layer that I expected to be included is skipped:
linux-96boards_4.4.bb (skipped):
and the .bbappend to that recipe ignored. After looking into this, I've found the linux-96boards_4.4.bb recipe includes a number of .bbclass and .inc files and it is one of these files which is causing the skip. Is there a way to find out the reason for the skip and where in the code it happens?
Thank you.

Related

How to disable sstate-cache per recipe in Yocto

I have some self written yocto recipes, which create issues with the yocto sstate-cache mechanism (like not rebuilding the recipe when dependencies have changed). Is there a way to disable sstate-caching on a per recipe basis?
Searching the interwebs I can only find very old and by now broken mechanisms:
https://patchwork.openembedded.org/patch/17039/
Or only partial disable functions:
https://patchwork.openembedded.org/patch/130719/
My Yocto version is Zeus and above.
Thanks and cheers!
In the recipe:
SSTATE_SKIP_CREATION = "1"
or, from outside the recipe (e.g. local.conf):
SSTATE_SKIP_CREATION_pn-recipefoo = "1"
SSTATE_SKIP_CREATION_pn-recipebar = "1"
You can verify if sstate exists for a recipe, using oe-check-sstate, e.g.:
oe-check-sstate yourimage | grep recipefoo
and you can remove sstate for a recipe using:
bitbake -c cleansstate recipefoo
However, it is concerning that your recipe interferes with the sstate mechanism. Ensure that you are correctly setting & updating the version and revision of your packages whenever the source code changes.
If your recipe source is stored alongside your Yocto metadata, consider using externalsrc to reference it, allowing Yocto to better track changes.

Bitbake understanding the EXCLUDE_FROM_WORLD mechanism

I'm developing on Yocto 2.4 rockowith a BSP given by my provider. I'm trying to build modemmanager from the meta-openembedded layer, included in the meta-oe sub layer.
The configure task fail and give me as error :
checking for gobject-introspection...
configure: error: gobject-introspection-1.0 is not installed
After some search I've installed the libgirepository1.0-dev package on my host machine. But the error is always present.
I've continued investigations, and find in my recipe log the line :
DEBUG: EXCLUDE FROM WORLD: virtual:native:/home/test/share/sc20_linux/poky/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.52.1.bb
I've tried to find which recipe excludes the dependency, with no success.
Can you help me to understand how works the EXCLUDE_FROM_WORLD mechanism ?
Thanks for your help.
I suspect that is debug output and doesn't mean the recipe is excluded. Have you looked at the modemmanager recipe to see if it has a DEPENDS on gobject-introspection-native and perhaps gobject-introspection? If not, or the PACKAGECONFIG isn't set, try adding the DEPENDS or enabling the PACKGECONFIG?
Also, have you tried simply building "bitbake object-introspection-native" and "bitbake object-introspection". You should get an error about why they ar disabled if you try and build them directly and they are excluded/disabled for some reason.

Does a recipe provided as DEPENDS can have own do_install() in yocto?

I am trying to build a custom recipe with Yocto (Rocko) for my Linux i.MX6 based embedded system.
The main recipe had dependency on a other custom recipe(as the main recipe is using header-files from this recipe) which is also creating some binaries which needs to be included in the final image.
I have added other_recipe(nbdkit) in the "DEPENDS" of main_recipe.bb
DEPENDS += "nbdkit"
the main recipe is creating a .so with the help of its own source file which is including header-files from the 'kit' recipe. I am able to install the binaries & .so generated using this main_recipe by adding it in do_install().
Now in the other_recipe(nbdkit http://cgit.openembedded.org/meta-openembedded/tree/meta-networking/recipes-support/nbdkit/nbdkit_git.bb?h=master), When I add do_install()to include the binaries generated from that recipe the main_recipe build gets failed with PKG_CONFIG error as follow,
| Package nbdkit was not found in the pkg-config search path.
| Perhaps you should add the directory containing `nbdkit.pc'
| to the PKG_CONFIG_PATH environment variable
| No package 'nbdkit' found
Other build errors says that the header-files of kit included in the main_recipe is not found.
app-nbdkit-plugin.c:2:10: fatal error: nbdkit-plugin.h: No such file or directory
Where app-nbdkit-plugin.c is source file of main_recipe & kit-plugin.h is header file of other_recipe.
The strange thing is, when I remove do_install() from other_recipe(nbdkit) the main_recipe is getting built successfully.
Now I doubt, Is it possible to set a recipe as DEPENDS of other recipe and at the same time it provides output file as do_install()?
Will sharing header-files from other_recipe to main_recipe resolves the issue? If yes, how to do that?
Thanks.
[EDIT] Added nbdkit recipe link.

bitbake BBPATH confusion

In the bitbake manual (https://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manual.html) it says:
3.3.1. Locating Include and Class Files
BitBake uses the BBPATH variable to locate needed include and class files. The BBPATH variable is analogous to the environment variable PATH.
3.3.3. include Directive
BitBake understands the include directive. This directive causes BitBake to parse whatever file you specify, and to insert that file at that location. The directive is much like its equivalent in Make except that if the path specified on the include line is a relative path, BitBake locates the first file it can find within BBPATH.
As an example, suppose you needed a recipe to include some self-test definitions:
include test_defs.inc
However, I see many openembedded-core recipes that include files that seem to be relative to the file they are being included from rather than being in a directory in BBPATH, i.e.
Assume we have this directory structure:
mything.bb
mything.inc
include/mything.inc
And mything.bb contains:
require mything.inc
require include/mything2.inc
However, these files are not in the BBPATH. I run bitbake -e mything.bb and BBPATH clearly does not contain the directory containing mything.inc or include/mything2.inc.
So the question is, is it true that include/require directives first search for the file relative to the file the directive appears in? Then and the falls back to searching for it in the BBPATH? If so, is this feature just missing from the bitbake user manual documentation?

how to make bitbake print options of do_configure

I'm having trouble cross compiling Qt5 for beaglebone using openembedded with bitbake. I think in step do_configure not everything is passed from my *.bbappend and no platform plugins are installed (I need 'linuxfb').
My question will be: how to make bitbake print list of arguments it passes to ./configure?
There's a few ways to get that info, I would suggest looking in the recipe work directory:
temp/log.do_configure contains the configure task log which should list exact ./configure-command
build/ contains the projects own build system artefacts
bitbake -e <recipe> | grep <VARIABLE> is very useful if you want to know what variable values end up as (check e.g. PACKAGECONFIG and PACKAGECONFIG_CONFARGS values if you're modifying packageconfig).