Yocto build succeeds, but warning about missing RDEPENDS - yocto

I'm using Yocto to compile my application for my target hardware. The build succeeds, but I get a warning:
WARNING: myApplication-0.0.1-r0 do_package_qa: QA Issue: /usr/local/bin/myApplication contained in package myApplication requires libstdc++.so.6(CXXABI_1.3.3), but no providers found in RDEPENDS_myApplication? [file-rdeps]
I've added everything I can find to both the DEPENDS and RDEPENDS of my application's recipe, but I'm still getting that error.
DEPENDS += "gcc-runtime"
RDEPENDS_${PN} += "libstdc++ libstdc++-dev gcc-runtime"
Is there something I can add to my RDEPENDS to eliminate this warning?
I have also tried these other combinations, all of which resulted in a successful build, and of which give the same warning.
Both DEPENDS and RDEPENDS empty.
RDEPENDS_${PN} += "libstdc++"
RDEPENDS_${PN} += "libstdc++ libstdc++-dev
RDEPENDS_${PN} += "libstdc++ gcc-runtime DEPENDS += "gcc-runtime"

Please try to add
RDEPENDS_${PN} += "libstdc++6"
RDEPENDS needs the output package name which usually is the name of ipk or rpm and
not the recipe name which generated the given output package. Secondly packages containing only libraries also use debian library naming conventions so they get renamed like above.

Related

eudev was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES)

My recipe needs eudev.
RDEPENDS_${PN} += "eudev"
but when bitbake it:
it got:
ERROR: Nothing RPROVIDES 'eudev' (but foo_7.4.5.0.bb RDEPENDS on or otherwise requires it)
eudev was skipped: conflicting distro feature 'systemd' (in DISTRO_FEATURES)
If you want libudev, then DEPEND on udev. This is provided by either systemd or eudev.

yocto recipe gives error -dev package contains non-symlink .so

I am trying to copy some of the precompiled libraries to my core-image-minimal using a recipe.
I am getting error below
-dev package contains non-symlink .so:scripts-dev path '/work/armv7ahf-neon-poky-linux-gnueabi/scripts/1.0-r0/packages-split/scripts-dev/usr/lib/libasm-0.148.so'
I am having some libraries like libasm-0.148.so, few .so which are not having any softlink to respective versioned libraries.
SOLIBS = ".so"
SOLIBS += ".so.*"
FILES_SOLIBSDEV = ""
INSANE_SKIP_${PN} += "dev-so"
I tried many changes in the recipe like below still getting same error or different error like added to package but not shipped. Above flags I tried in the recipe.
When dealing with pre-compiled packages take a look at:
https://wiki.yoctoproject.org/wiki/TipsAndTricks/Packaging_Prebuilt_Libraries
Usually the following configs fix this type of issue:
INSANE_SKIP_${PN} += " ldflags"
INHIBIT_PACKAGE_STRIP = "1"
INHIBIT_SYSROOT_STRIP = "1"
SOLIBS = ".so"
FILES_SOLIBSDEV = ""

bitbake: How to include .so build by one recipe into another recipe

How do I include a shared library in another bitbake recipe that makes use of a makefile to compile a program depending on the shared library?
So i have:
bitbake recipe for compiling a shared library(mylib.so)
bitbake recipe for a small program(myprog) depending on the library(mylib.so)
How do link the shared library to this small program?
You need to set up proper dependency. If mylib.so is required to compile myprog, add package that supplies mylib.so to compile time dependencies of myprog.
Usually package name is the same as corresponding recipe's name, so if the recipe that produces mylib.so is named mylib_1.0.bb, add the following line to the recipe for myprog:
DEPENDS += "mylib"
If mylib.so is used only at runtime, use
RDEPENDS_${PN} += "mylib"

How to package CMake Module in NativeSDK?

I am trying to install a set of CMake utilty functions under /usr/share/cmake-3.4/Modules/MYMODULES/useful.cmake within a Yocto build.
Here is my current (sanitized) recipe (call it my-useful-modules.bb)
SECTION = "devel"
LICENSE = "CLOSED"
inherit cmake
EXTERNALSRC := "path/to/source/code"
do_compile() {
:
}
FILES_${PN} += "${datadir}/cmake-3.4/Modules/MYMODULES/*"
BBCLASSEXTEND = "nativesdk"
The configure and install tasks work fine, and if I look under image in tmp/work/..., I see the full tree (including all my host directories as expected).
But I keep getting the following error
ERROR: nativesdk-my-useful-modules-1.0-r0 do_package: QA Issue:
nativesdk-my-useful-modules: Files/directories were installed but not
shipped in any package:
Followed by a long list of files which basically includes everything under image.
These modules need to be available both in the native sysroot during the build, and in the standard SDK built with populate_sdk.
Which package should I be specifying with FILES_${PN} to get them packaged?
I'd also appreciate knowing how to either avoid specifying the cmake version in the FILES statement, or get it from the build system.
Updating FILES_${PN} will resolve your error and also there is no need to provide cmake version in this case.
FILES_${PN} += "${datadir}/*"

add gdb package to riscv image using yocto

i am new to yocto, trying to add gdb to the resulting image using IMAGE_INSTALL_append="gdb" in local.conf.
I got the following error:
ERROR: Nothing RPROVIDES 'python-compilegdb' (but /home/osdev/riscv-poky/build/../meta-riscv/recipes-core/images/core-image-riscv.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'python-compilegdb' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['python-compilegdb']
ERROR: Required build target 'core-image-riscv' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-riscv', 'python-compilegdb']
How can I resolve this error?
Thanks!
The override-style append you used literally only appends the string you give to the variable value: this means you need to add a prepending space yourself:
IMAGE_INSTALL_append = " gdb"