Jmeyer1292 / robot_cal_tools

A suite of tools focused on calibration of sensors for robotic workcell development
Apache License 2.0
140 stars 40 forks source link

undefined reference to `YAML::Node::~Node()' #102

Closed iydv closed 2 years ago

iydv commented 2 years ago

Hi,

during compilation of the current master branch using catkin build -DCMAKE_BUILD_TYPE=Release command, I am getting following error:

Errors     << rct_ros_tools:make /home/ilya/ros/workspaces/callibration_ws/logs/rct_ros_tools/build.make.001.log                                                                                          
/usr/bin/ld: CMakeFiles/rct_ros_tools_cmd.dir/src/command_line_cal.cpp.o: in function `main.cold':
command_line_cal.cpp:(.text.unlikely+0x207): undefined reference to `YAML::Node::~Node()'
/usr/bin/ld: CMakeFiles/rct_ros_tools_cmd.dir/src/command_line_cal.cpp.o: in function `main':
command_line_cal.cpp:(.text.startup+0xee0): undefined reference to `YAML::Node::~Node()'
collect2: error: ld returned 1 exit status

To fix this issue, I have replaced in the file rct_ros_tools/include/rct_ros_tools/loader_utils.h the following line

yaml-cpp/node/node.h

with

yaml-cpp/yaml.h

Can you please check and correct the issue ?

marip8 commented 2 years ago

What OS and ROS version are you using? This repository runs CI on Xenial/Kinetic, Bionic/Melodic, and Focal/Noetic, all of which result in a successful build on the current master branch (as of 6 days ago). We would be happy to review and accept a PR with these changes if they are in fact necessary

iydv commented 2 years ago

I am using Ubuntu 20.04.3 LTS and Noetic. I am using recent yaml-cpp from Ubuntu repositories. I have seen a similar issue in https://github.com/jbeder/yaml-cpp/issues/554#issue-292343341 discussion. According to @jbeder yaml-cpp/node/node.h is a private header.

Levi-Armstrong commented 2 years ago

I believe this most likely was a result of using the "include only what you use" tool. If you create a PR we will get it merged

Levi-Armstrong commented 2 years ago

A fix has been merged. Thank you for reporting the issue.