0

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

2 Answers 2

0

Can you try adding the following rdepends to your recipe:

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

And see if that solves this issue?

5
  • Hello!Thanks for the suggestion! I tried adding that but unfortunately it didn't solve the problem :( I'm going to update my current .bb file
    – Komatsu
    Feb 17, 2023 at 1:52
  • I tried to add python3-native both to DEPENDS and RDEPENDS, but neither work
    – Komatsu
    Feb 17, 2023 at 1:54
  • I see you have this line commented out as well: INSANE_SKIP_${PN} += "file-rdeps" Did that failed too? Feb 17, 2023 at 19:56
  • That succeeded, but the package was not installed on the yocto image.. I think that made the bitbake skipped thepackage installation since it's buggy(?)
    – Komatsu
    Feb 21, 2023 at 0:12
  • By the way I somehow found the solution! Well there is still another error after that but I'm going to open a new question on that, thank you very much for your help!
    – Komatsu
    Feb 21, 2023 at 0:13
0

I solved the error by adding this:

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.