ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Setting project name "debug_msgs" occurs error while "mydebug_msgs" is ok

asked 2018-08-08 00:20:20 -0600

lxbeyond gravatar image

updated 2018-08-08 00:45:46 -0600

jayess gravatar image

when I build my msg project whose name is "debug_msgs" with ros2 bouncy, I get error as follow:

command:

   colcon build

output:

Starting >>> debug_msgs
--- stderr: debug_msgs                         
CMake Error at /root/ros2_ws/install/ament_cmake_export_libraries/share/ament_cmake_export_libraries/cmake/ament_export_libraries.cmake:56 (message):
  ament_export_libraries() package 'debug_msgs' passes the build
  configuration keyword 'debug_msgs__rosidl_generator_c' as the last exported
  library
Call Stack (most recent call first):
  /root/ros2_ws/install/rosidl_generator_c/share/rosidl_generator_c/cmake/rosidl_generator_c_generate_interfaces.cmake:171 (ament_export_libraries)
  /root/ros2_ws/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:38 (include)
  /root/ros2_ws/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:169 (ament_execute_extensions)
  CMakeLists.txt:23 (rosidl_generate_interfaces)


---
Failed   <<< debug_msgs [ Exited with code 1 ]

Summary: 0 packages finished [1.21s]

but after I changed the project name to "mydebug_msgs", It goes well, could any one tell me why ? the test demo is : https://github.com/lxbeyond/bouncy_msg

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2018-08-08 11:25:47 -0600

Dirk Thomas gravatar image

CMake uses a few keyword to identify libraries with special semantic: debug, optimized, and generic.

The code was supposed to only detect those but it turns out the regex was incorrect and matches the library in your case (starting with debug).

Please see the following PR which fixes the regex and allows you to build your package as expected: https://github.com/ament/ament_cmake/...

edit flag offensive delete link more
1

answered 2018-08-08 01:50:06 -0600

tfoote gravatar image

I haven't had a chance to look into it. But I'd suspect that your choice of debug as a name is likely colliding with a keyword at one of the layers.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-08-08 00:20:20 -0600

Seen: 154 times

Last updated: Aug 08 '18