Skip to content

Conversation

Tacha-S
Copy link

@Tacha-S Tacha-S commented Oct 6, 2025

Use libyaml vendor for building moveit_task_constructor_visualization package.

@rhaschke
Copy link
Contributor

rhaschke commented Oct 6, 2025

As you can see here, the code builds without issues. The yaml dependency was optional. I'm wondering why you got the build error. Maybe you had installed libyaml-0-2, but not libyaml-dev?
In any case you should target a main development branch, i.e. ros2 or ideally master.

@rhaschke rhaschke changed the title Fix yaml depends Make yaml dependency mandatory Oct 6, 2025
@Tacha-S
Copy link
Author

Tacha-S commented Oct 6, 2025

Both packages are installed, and libyaml-0-2 cannot be removed because it’s required by other dependencies.

libyaml-0-2/noble,now 0.2.5-1build1 amd64 [installed,automatic]
  Fast YAML 1.1 parser and emitter library
libyaml-dev/noble,now 0.2.5-1build1 amd64 [installed,automatic]
  Fast YAML 1.1 parser and emitter library (development)

Although YAML is an optional dependency, it seems the linker still finds libyaml-0-2, which causes the linking error.
Also, even without YAML, there’s still a build error because rviz::StringProperty exists in a different namespace.
For ROS packages, it’s better to use libyaml_vendor, since that avoids environment-dependent issues.

I can recreate the PR targeting the ros2 or main branch, but if you’re willing to backport it to Jazzy, I’ll handle it.

@rhaschke
Copy link
Contributor

rhaschke commented Oct 6, 2025

I still don't understand the origin of your linking issue. If both packages are available, the build does succeed.
The vendor packages just ensure that the wrapped library is installed. They primarily serve Windows builds, were the library needs to be build from source.

@Tacha-S
Copy link
Author

Tacha-S commented Oct 6, 2025

Even when I build inside the ros:jazzy container and run rosdep install, I get the same issue.
It only started happening around last week, so maybe the MoveIt container using CI is outdated?

@rhaschke
Copy link
Contributor

rhaschke commented Oct 6, 2025

I just rebuild within a freshly downloaded ros:jazzy-ros-core container - without the described issues.
Instead, I ran into this:

/usr/bin/ld: warning: libgz-math7.so.7, needed by /opt/ros/jazzy/lib/librviz_default_plugins.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /opt/ros/jazzy/lib/librviz_default_plugins.so: undefined reference to `gz::math::v7::Angle::Normalize()'
/usr/bin/ld: /opt/ros/jazzy/lib/librviz_default_plugins.so: undefined reference to `gz::math::v7::Angle::Radian() const'
collect2: error: ld returned 1 exit status

... and had to manually install ros-jazzy-ros-gz.

@Tacha-S
Copy link
Author

Tacha-S commented Oct 8, 2025

I was also a bit mistaken.
Here’s how to reproduce it:

docker pull ros:jazzy
docker run --name mtc -it ros:jazzy
apt update
apt install ros-jazzy-ros-gz ros-jazzy-libcamera
mkdir -p ws/src
docker cp moveit_task_constructor mtc:ws/src   # (from host PC)
cd ws
rosdep install --from-paths . -yir
source /opt/ros/jazzy/setup.bash
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to moveit_task_constructor_visualization

This reproduces the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants