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

Catkin not building packages in order

asked 2018-06-13 08:21:01 -0500

jotator gravatar image

I have just had a really odd problem with catkin_make. I have been successfully building a workspace containing three packages, two with messages and another one with an executable.

So far, removing the build and devel folders and relaunching the command worked fine, but now for some reason the process crashes in the linking phase of the executable while the headers of the other packages are still being generated. This means that I have to relaunch the command several times, getting different errors that come and go as new code is generated each time until finally the executable gets linked successfully.

Any ideas what the problem might be?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-13 09:36:42 -0500

mgruhler gravatar image

You need to tell CMake which package requires which targets (i.e. generated files, like the message headers or a library) are requires by your target (i.e. executable/library). Do this using the add_dependencies call. This is also described on the catkin documentation on building messages

edit flag offensive delete link more


Thank you so much! After reading the page you provided I went back to the tutorial and checked my own CMake file and, indeed, I wasn't specifying the dependency.

jotator gravatar image jotator  ( 2018-06-13 09:47:24 -0500 )edit

Question Tools

1 follower


Asked: 2018-06-13 08:21:01 -0500

Seen: 997 times

Last updated: Jun 13 '18