Topics

RDEPENDS problem


Greg Wilson-Lindberg
 

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"

which seems to me like it should satisfy the requirements of the RDEPENDS, but it is not. bitbake initially gave me a warning
that listed canfestival as needing to be added to an RDEPENDS for userconfig. But now it is saying that it can't figure out
what package supplies the libcanfestival.so file.

Can someone help me to understand what is going on? How do I explicitly say that a package supplies a given file?


Maciej Pijanowski
 


On 21.09.2020 23:46, 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"

which seems to me like it should satisfy the requirements of the RDEPENDS, but it is not. bitbake initially gave me a warning 
that listed canfestival as needing to be added to an RDEPENDS for userconfig. But now it is saying that it can't figure out
what package supplies the libcanfestival.so file.

Can someone help me to understand what is going on? How do I explicitly say that a package supplies a given file?
You could try with PROVIDES: https://www.yoctoproject.org/docs/latest/ref-manual/ref-manual.html#var-PROVIDES



-- 
Maciej Pijanowski
Embedded Systems Engineer
GPG: 9963C36AAC3B2B46
https://3mdeb.com | @3mdeb_com


Quentin Schulz
 

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_Libraries#Non-versioned_Libraries
if there is really no way for you to avoid having a non-versioned library.

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

Cheers,
Quentin


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@...>
Sent: Tuesday, September 22, 2020 1:20 AM
To: Greg Wilson-Lindberg <GWilson@...>
Cc: Yocto list discussion <yocto@...>
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