Re: RDEPENDS problem


Greg Wilson-Lindberg
 

Hi Quentin,
It turns out that there was a problem in the build of the libcanfestival.so library that was adding in a reference to ../bin/....
This caused the failure that I asked about initially.

Thank you for your suggestions that then led me to figuring out the problem with the canfestival build.

Greg

-----Original Message-----
From: Quentin Schulz <quentin.schulz@streamunlimited.com>
Sent: Tuesday, September 22, 2020 1:20 AM
To: Greg Wilson-Lindberg <GWilson@sakuraus.com>
Cc: Yocto list discussion <yocto@yoctoproject.org>
Subject: Re: [yocto] RDEPENDS problem

Hi Greg,

On Mon, Sep 21, 2020 at 09:46:51PM +0000, Greg Wilson-Lindberg wrote:

 I have a custom recipe that copies a .so, that libMotors.so calls functions in
another libcanfestival.so.

When I first added in the copy of the .so I didn't have an RDEPENDS
and Yocto printed out an warning listing the package that it wanted. I
added an RDEPENDS_${PN} with all of the packages listed, but I'm still
getting an error for the first libMotors.so:

ERROR: userconfig-1.0-r0 do_package_qa: QA Issue:
/home/sakura/lib/libMotors.so.1.0.0 contained in package userconfig
requires libcanfestival.so, but no providers found in
RDEPENDS_userconfig? [file-rdeps]

In userdepends I added:

RDEPENDS_${PN} += "canfestival libelf libgcrypt pcsc-lite-lib qtbase
qtdeclarative qtserialport zint"

Package canfestival_3-asc in has:

FILES_${PN} = "/usr/lib/libcanfestival.so /usr/lib/libcanfestival_unix.so
/usr/lib/libcanfestival_can_socket.so"
.so files are installed in the -dev package even with the line above.

Please have a look here:
https://wiki.yoctoproject.org/wiki/TipsAndTricks/Packaging_Prebuilt_Librarie
s#Non-versioned_Libraries
if there is really no way for you to avoid having a non-versioned library.
First, the canfestival package that I have doesn't create versioned libraries, only the non-versioned .so's.

I changed the canfestival .bb to:

SOLIBS = ".so.*"
SOLIBSDEV = ".so"

FILES_${PN} = " ${libdir}/lib*${SOLIBSDEV}"
FILES_SOLIBSDEV ?= " ${libdir}/lib*${SOLIBSDEV}"
FILES_${PN}-dev = " /usr/include/canfestival/*.h ${FILES_SOLIBSDEV}"

And I get the following error:

ERROR: canfestival-3-asc-r01 do_package_qa: QA Issue: -dev package contains non-symlink .so: canfestival-dev path '/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/canfestival/3-asc-r01/packages-split/canfestival-dev/usr/lib/libcanfestival_unix.so'
-dev package contains non-symlink .so: canfestival-dev path '/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/canfestival/3-asc-r01/packages-split/canfestival-dev/usr/lib/libcanfestival.so'
-dev package contains non-symlink .so: canfestival-dev path '/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/canfestival/3-asc-r01/packages-split/canfestival-dev/usr/lib/libcanfestival_can_socket.so' [dev-elf]
ERROR: canfestival-3-asc-r01 do_package_qa: QA run found fatal errors. Please consider fixing them.

I removed the ${FILES_SOLIBSDEV} from the FILES_${PN}-dev and then I get:
WARNING: canfestival-3-asc-r01 do_package: canfestival-dev-3-asc was registered as shlib provider for ../bin/libcanfestival.so, changing it to canfestival-3-asc because it was built later
WARNING: canfestival-3-asc-r01 do_package: canfestival-dev-3-asc was registered as shlib provider for libcanfestival_can_socket.so, changing it to canfestival-3-asc because it was built later
WARNING: canfestival-3-asc-r01 do_package: canfestival-dev-3-asc was registered as shlib provider for libcanfestival_unix.so, changing it to canfestival-3-asc because it was built later
ERROR: userconfig-1.0-r0 do_package_qa: QA Issue: /home/sakura/lib/libMotors.so.1.0.0 contained in package userconfig requires libcanfestival.so, but no providers found in RDEPENDS_userconfig? [file-rdeps]
ERROR: userconfig-1.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.

It looks like the first warning is the key to the ERROR of not finding libcanfestival.so, but not getting errors for the other 2 libraries.

I looked in the build for canfestival and nowhere is there a bin/libcanfestival.so. Any ideas of how this could be created or referenced?




You can check if .so files are part of a package by using `oe-pkgdata-util find-
path /usr/lib/libcanfestival.so`

Cheers,
Quentin

Join yocto@lists.yoctoproject.org to automatically receive all group messages.