[Kirkstone] (humble) mrpt2 building not work
Describe the bug
I am building on meta-ros kirkstone and encountering the following error when running bitbake mrpt2:
ERROR: Nothing PROVIDES 'ROS_UNRESOLVED_DEP-liboctomap-dev' (but /home/myname/yocto-orin/brain_base/my-build/build/../layers/meta-ros/meta-ros2-humble/generated-recipes/mrpt2/mrpt2_2.13.5-1.bb DEPENDS on or otherwise requires it)
To resolve this error, I added the following to ros-distro.inc:
ROS_UNRESOLVED_DEP-liboctomap-dev = "octomap"
After applying this change and running bitbake again, I encountered a new error:
| -- Found Python3: /usr/bin/python3 (found version "3.8.10") found components: Interpreter | Traceback (most recent call last): | File "/home/myname/yocto-orin/brain_base/my-build/build/tmp-glibc/work/armv8a-oe-linux/mrpt2/2.13.5-1-r0/recipe-sysroot/usr/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py", line 21, in
| from ament_package.templates import get_environment_hook_template_path | ModuleNotFoundError: No module named 'ament_package'
To address this, I modified the mrpt2_2.13.5-1.bb file as follows:
inherit setuptools3
DEPENDS += "ament-package-native ament-package"
Despite these changes, I encountered additional errors. To resolve each error, I had to repeatedly add more lines to the recipe.
inherit setuptools3 pkgconfig autotools cuda
EXTRA_OECMAKE += "-DENTYPO_TTF_FILE=${S}/3rdparty/nanogui/resources/entypo.ttf"
EXTRA_OECMAKE += "-DROBOTO_BOLD_TTF_FILE=${S}/3rdparty/nanogui/resources/Roboto-Bold.ttf"
EXTRA_OECMAKE += "-DROBOTO_REGULAR_TTF_FILE=${S}/3rdparty/nanogui/resources/Roboto-Regular.ttf"
CFLAGS += "-I${STAGING_DIR_TARGET}/usr/include"
do_configure:prepend() {
source ${STAGING_DIR_HOST}/usr/share/rosidl_typesupport_c/local_setup.bash
}
DEPENDS += " \
ament-package-native ament-package \
ament-cmake-libraries \
ament-cmake-export-definitions \
... (Omitted for brevity)
"
However, with every error fixed, new errors kept arising. This has led me to suspect that I might be approaching this problem incorrectly.
So, I would like to report that I am unable to successfully build mrpt2 using bitbake and seek guidance on how to resolve this issue. Could you please help me with this problem?
To Reproduce
I started the build with the command: kas build ../kas/oeros-kirkstone-humble-jetson-agx-xavier-devkit.yml and added several layers to the configuration. All additional layers were cloned using git clone -b kirkstone <layers>.
Additional layers outside of meta-ros:
${TOPDIR}/../layers/meta-qt5 \
${TOPDIR}/../layers/meta-lmp/meta-lmp-base \
${TOPDIR}/../layers/meta-updater \
${TOPDIR}/../layers/meta-security \
${TOPDIR}/../layers/meta-security/meta-tpm \
Expected behavior
bitbake mrpt2 succeed
Hi @gyuhwan-park , thanks for reporting the problem you are having. There is work going on to make all of ros-image-world build for kirkstone+humble. You can see the work-in-progress (WIP) pull request here: https://github.com/ros/meta-ros/pull/1150/commits
The commit relating to mrpt2 is here: https://github.com/ros/meta-ros/pull/1150/commits/eb2c38a8d67788992aba7035444722bfee64aace#diff-82e82d17f2d91756400deba50de2e2af857d2dceab42a2c019ca4498181780ea
However, it may depend on other changes in the commit series.
I hope that it may help address your issue. Please let me know if it does or not as that would be valuable feedback.
The mrpt2 package is no longer in Humble, but the mrpt packages now are at 2.x: https://index.ros.org/?search_packages=true&pkgs=mrpt
However, mrpt has a dependency on openblas which is not supported in kirkstone. I have recently added meta-python-ai to provide support for python3-scipy and openblas. It does support the newer Yocto releases, but not kirkstone. If kirkstone support is still needed, you may be able to contribute kirkstone support to meta-python-ai to get it working.
Please open a new issue if you still have problems with mrpt.