SOLVED – ROS2 Yocto – no providers found in RDEPENDS_?

Question:

A Bit Backstory

I’m trying to install ROS2 package to a Yocto image using Devtools. I follow through this tutorial here with some modification according to my project.

The devtools built successfully, but when I run

ros2 pkg list

My ROS2 package wasn’t there.
I’ve added my layers on the bblayers.conf etc.

So i thought that I need to bitbake the image again to install the ros2 package inside the Yocto image.

This is where the problem is

As I run

bitbake core-image-sato

I got an error

py-pubsub-0.0.0+git999-r0 do_package_qa: QA Issue: /usr/lib/py_pubsub/talker contained in
package py-pubsub requires /home/<PC_name>/yocto/build/tmp/work
/aarch64-poky-linux/py-pubsub/0.0.0+git999-r0/recipe-sysroot-native/usr/bin/python3-native/python3, but no providers found in RDEPENDS_py-
pubsub? [file-rdeps]

I’m guessing the problem is missing dependency added to RDEPENDS on the py-pubsub_git.bb file, so I added

RDEPENDS_${PN} += "/home/<PC_name>/yocto/build/tmp/work/aarch64-poky-
linux/py-pubsub/0.0.0+git999-r0/recipe-sysroot-native/usr/bin/python3-
native/python3"

but another error popped out. I also tried to add python3 to the RDEPENDS but I still got the same error.

Any help would be appreciated!
Thank you.

py-pubsub_git.bb

SUMMARY = "ROS2YOCTO: Examples of minimal publisher/subscriber using rclpy"
HOMEPAGE = "UNKNOWN"

LICENSE = "CLOSED"
LIC_FILES_CHKSUM = ""

SRC_URI = "git://github.com/<username>/py-pubsub.git;protocol=https;branch=master"

# Modify these as desired
PV = "0.0.0"

S = "${WORKDIR}/git"

inherit setuptools3

DEPENDS += "python3-setuptools-native ament-copyright ament-flake8 ament-pep257 ament-cmake-python python3-distlib python3 python3-native"

# WARNING: the following rdepends are from setuptools install_requires. These
# upstream names may not correspond exactly to bitbake package names.
RDEPENDS_${PN} += "python3-setuptools python3 ament-cmake-python"

# WARNING: the following rdepends are determined through basic analysis of the
# python sources, and might not be 100% accurate.
RDEPENDS_${PN} += "python3-core rclpy std-msgs"
RDEPENDS_${PN} += "python3-six python3-debugger python3-modules"

#RDEPENDS_${PN} += "bc python flex bison ${TCLIBC}-utils"
#RDEPENDS_${PN} += "openssl-dev util-linux"
#RDEPENDS_${PN} += "${@bb.utils.contains('ARCH', 'x86', 'elfutils', '', d)}"

FILES_${PN} += "/usr/share/ament_index/*"
#ALLOW_EMPTY_${PN} = "1"

#INSANE_SKIP_${PN} += "file-rdeps"
#INSANE_SKIP_${PN} += "build-deps"

Edit:
I found a package that also produces the exact same error as mine here, and I tried to do what they suggested

do_install () {
    # Specify install commands here
    rm -r ${D}/usr/lib/py-pubsub
}

but it produces this error

No such file or directory

which doesn’t make sense to me since the directory is there, I even copy pasted the directory

Asked By: Komatsu

||

Answers:

Can you try adding the following rdepends to your recipe:

RDEPENDS_${PN} = "python3-core python3-native"

And see if that solves this issue?

Answered By: Roberto Gutierrez

Problem solved! I’m going to answer my own question for the sake of future readerswho might face the same problem.

I solved the error by adding these

RDEPENDS_${PN} += "python3 python3-setuptools python3-native python3-core"

by default, there will be 2 RDEPENDS added by devtool (idk why), but I made it into one

Thanks for everyone that helped!

Answered By: Komatsu
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.