Yocto Image build fails because "nothing RPROVIDES libavresample" - yocto

I am trying to build a custom Yocto image based on fsl-image-gui for my iMX6 based board SECO A62J. I use Hob to do this.
After having selected my machine, my layers and my image, I custom my packages list by adding chromium. This automatically selects libexif and libav which are Chromium dependencies. The build of the packages is successful
The last step is the build of the image itself, and this is where my problem appears. I select the packages I want to include in my image, including Chromium, libexif and libav (and its dependencies).
And I got those errors :
Nothing RPROVIDES 'libavresample' (but
/home/adrien/fsl-release-bsp/build_anna/recipes/images/fsl-image-gui-edited-20170131-144607.bb RDEPENDS on or otherwise requires it)
and
Required build target 'fsl-image-gui-edited-20170131-144607' has no
buildable providers. Missing or unbuildable dependency chain was:
['fsl-image-gui-edited-20170131-144607', 'libavresample']
However, the library libavresample.so is built successfully and can be found under my build directory in sysroots/"machine_name"/usr/lib/
Why Yocto can't find and include this library in my image, What am I missing here?

In your local.conf :
LICENSE_FLAGS_WHITELIST += " commercial"

Related

How to (force Yocto to) create ${PN}.deb file?

I'm trying to add a library (a cmake project) to my Yocto project/image.
The package essentially consists of one static library (named hello.a) with some header files in C.
I wrote a recipe and could configure, compile, package it.
The packaging results are four files {hello-dbg, hello-dev, hello-src, hello-staticdev}.deb
So there is no hello.deb.
And that seems to be a problem preventing me to create image.
The following packages have unmet dependencies:
packagegroup-utils-extra : Depends: hello but it is not installable
E: Unable to correct problems, you have held broken packages.
When I try to add that by defining:
FILES_${PN} += "/usr/lib/hello.a"
bitbake does not allow adding static libraries to anything but staticdev -> so that does not work.
My question is then, as the title says, how to (force Yocto to) create ${PN}.deb file?
The empty packages (i.e. containing no files) are not created by default. If you want to override it, you can do it via the ALLOW_EMPTY variable for a package like this:
ALLOW_EMPTY:${PN} = "1"
You can also check the official documentation for ALLOW_EMPTY.
Just for clarification:
You can install the ${PN} package (it won't install any file on the target system).
As before, your static library will still be shipped in the ${PN}-staticdev package.

Swift Package Manager failed extracting

I'm getting this Package Manager error, when switching to a different branch or cloning the project. Build fails and "Clean Build Folder" doesn't help.
Error:
failed extracting
'https://releases.amplify.aws/aws-sdk-ios/AWSConnect-2.26.6.zip'
which is required by binary target 'AWSConnect':
.../Library/Developer/Xcode/DerivedData/MyApp-cbgtlihuudupsqdzyjdbyvcwkilh/SourcePackages/artifacts/extract/AWSConnect
is not a directory
The following steps resolve the issue forcing all packages to download.
Product > Clean Build Folder
Delete DerivedData content (Preferences > Locations > Derived Data little arrow)
File > Packages > Reset Package Cache
Build
The Reset Package Cache step is the most important here. It forces all packages to download as if they where just added.
Another issue that can happen is if you have added a build configuration, make sure that you have replicated this build configuration name throughout all your in house libraries, frameworks and sub projects. If the project that uses your Library has no build configuration for the scheme you are building then it will not link and you will receive errors like:
failed extracting 'https://github.com/*.xcframework.zip' which is required by binary target 'BlahBlah': fchmod (file attributes) error: Operation not permitted

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.

Building a yocto image for RPi3

Recently I started with yocto-project to build images for raspberry-pi.
I cloned poky and meta-raspberrypi under a directory named as yocto_project on my ubuntu host. Initiated the build using source oe-init-build-env rpi-build.
The first image I created the rpi-basic-image which was a successful attempt.
Upon booting RPi with the image I got a CLI based interface, but the problem is few commands are missing. Came to know by-default all the packages didn't get combine with image, we need to add it manually for example systemd.
If I run bitbake-layers show-recipes I get long list of all the recipes available for RPi. So I added the text IMAGE_INSTALL_append = " systemd" after reading some documents online to append systemd. After this when I bitbake rpi-basic-image got error as ERROR: Nothing RPOVIDES 'systemd' (but /path_to/rpi-basic-image.bb RDEPENDS on or otherwise requires it)
ERROR: systemd was skipped: 'systemd' not in DISTRO_FEATURES
ERROR: Required build target 'rpi-basic-image' has no buildable providers
Don't have clue, why I get this error. How to resolve it. Also do I have to manually add those packages/recipes using build/local.conf to get all the commands.
Need a good explanation/guidance .
From Selecting an Initialization Manager - Yocto Development Manual:
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
You can set those variables in your local.conf.