Skip to contentSkip to conversation

RDEPENDS problem

DISCUSSION Greg Wilson-Lindberg 3 participants 4 messages Sep 21, 2020 – Sep 22, 2020

lore
Share & tools
lore
#0 lore raw

 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?

#1 lore raw
Quoted 14 lines · 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:

Quoted 7 lines

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

Quoted 3 lines
Signature · 4 lines
Maciej Pijanowski
Embedded Systems Engineer
GPG: 9963C36AAC3B2B46
https://3mdeb.com | @3mdeb_com
#2 lore raw
In reply to Greg Wilson-Lindberg

Hi Greg,

Quoted 9 lines · 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]

Quoted 8 lines

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

#3 lore raw

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

Quoted 35 lines

-----Original Message-----
From: Quentin Schulz <[email protected]>
Sent: Tuesday, September 22, 2020 1:20 AM
To: Greg Wilson-Lindberg <[email protected]>
Cc: Yocto list discussion <[email protected]>
Subject: Re: [yocto] RDEPENDS problem

Hi Greg,

Quoted 2 lines · Greg Wilson-Lindberg

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

another libcanfestival.so.

Quoted 4 lines

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:

Quoted 9 lines

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"

Quoted 4 lines

Package canfestival_3-asc in has:

FILES_${PN} = "/usr/lib/libcanfestival.so /usr/lib/libcanfestival_unix.so

/usr/lib/libcanfestival_can_socket.so"

Quoted 1 line
Quoted 6 lines

.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?

Quoted 6 lines

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

Cheers,
Quentin