2

I am new to Yocto. I am using Yocto scarthgap release and have cloned poky. I wanted to add support for bcc and bpftrace, hence trying to add meta-clang layer.

The layer shows up for me

$ bitbake-layers show-layers
NOTE: Starting bitbake server...
layer                 path                                                                    priority
========================================================================================================
core                  /mnt/secondary/poky/meta                                                5
yocto                 /mnt/secondary/poky/meta-poky                                           5
yoctobsp              /mnt/secondary/poky/meta-yocto-bsp                                      5
openembedded-layer    /mnt/secondary/poky/meta-openembedded/meta-oe                           5
clang-layer           /mnt/secondary/poky/meta-clang

And this is how my directory structure of poky looks like (meta-clang cloned inside poky) :

$ ls
bitbake        LICENSE.GPL-2.0-only  meta-clang         meta-yocto-bsp      README.poky.md
build          LICENSE.MIT           meta-openembedded  oe-init-build-env   README.qemu.md
contrib        MAINTAINERS.md        meta-poky          README.hardware.md  scripts
documentation  MEMORIAM              meta-selftest      README.md           SECURITY.md
LICENSE        meta                  meta-skeleton      README.OE-Core.md

But the problem is that I do not see bcc recipe, bpftrace recipe is seen fine though.

$ bitbake-layers show-recipes | grep bpftrace
bpftrace:
$ bitbake-layers show-recipes | grep bcc
$

In the source of meta-clang I see both recipes are present. Why bcc is not seen and how can I fix it?

meta-clang/dynamic-layers/meta-python/recipes-devtools/bcc/bcc_0.29.1.bb
meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb

And the build fails as expected :

$ bitbake core-image-minimal
Loading cache: 100% |                                                                     | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |####################################################################| Time: 0:00:30
Parsing of 1888 .bb files complete (0 cached, 1888 parsed). 3246 targets, 116 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES 'bcc' (but /mnt/secondary/poky/meta-clang/dynamic-layers/openembedded-layer/recipes-devtools/bpftrace/bpftrace_0.20.1.bb DEPENDS on or otherwise requires it). Close matches:
  bc
  byacc
NOTE: Runtime target 'bpftrace' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['bpftrace', 'bcc']
ERROR: Required build target 'core-image-minimal' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 'bpftrace', 'bcc']

Summary: There were 2 ERROR messages, returning a non-zero exit code.
4
  • What's your image recipe? Did you install both bcc and bpftrace? From first glance it seems that bcc should be possible to install, but I never used meta-clang. Not sure if the recipes-devtools folder name might have a special meaning. Commented Aug 7, 2024 at 6:34
  • @Mo_ I am using vanilla poky and image target core-image-minimal. Commented Aug 10, 2024 at 17:00
  • The secret is to use the variable BBFILES_DYNAMIC in your layer's conf/layer.conf. Commented Aug 12, 2024 at 0:41
  • Sorry I am still not able to understand what needs to be done here. I see BBFILES_DYNAMIC is already used in meta-clang's conf/layer.conf, but I do not see any condition there. Can you please elaborate for a noob like me to understand, as what exactly needs to be done here? Commented Jan 6 at 5:05

1 Answer 1

1

Please note that bcc recipe in meta-clang is placed under dynamic-layer for meta-python which means that it will only be activated if meta-python is added to the BBLAYERS, looking at the output of bitbake-layers show-layers above I see that your project does not add meta-python to list of layers. So please add it. You can edit conf/bblayers.conf file directly and add it manally or use bitbake-layers add-layer see https://docs.yoctoproject.org/dev/dev-manual/layers.html#adding-a-layer-using-the-bitbake-layers-script

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. I added meta-oe and meta-python and it worked. I did not know that we need to look at the directory structure as well for dependencies. This is my Day3 with Yocto. New learning for me. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.