[Ros-release] Target dependency tracking for msg dependencies

Daniel Stonier d.stonier at gmail.com
Fri Feb 8 08:04:16 UTC 2013

Hi all,

Can't work out if this is a problem on our end, or something in catkin.
Especially since I can't track down a similar example. I didn't notice us
having problems building until releasing. And then noticed people were
building it twice to get it to work.

Problem: package *kobuki_auto_docking* depends on actions in *kobuki_msgs *but
when catkin building them together, the actions aren't getting built in

Scanning dependencies of target kobuki_auto_docking_ros
[ 70%] Generating Python msg __init__.py for kobuki_msgs
[ 71%] Generating C++ code from kobuki_msgs/WheelDropEvent.msg
make[3]: Leaving directory `/opt/kobuki/debug/build'
make[3]: Leaving directory `/opt/kobuki/debug/build'
[ 71%] Built target kobuki_msgs_genpy
[ 72%] make[3]: Entering directory `/opt/kobuki/debug/build'
Generating C++ code from kobuki_msgs/AutoDockingAction.msg
[ 73%] Building CXX object
make[3]: Entering directory `/opt/kobuki/debug/build'
Scanning dependencies of target kobuki_bumper2pc_nodelet
make[3]: Leaving directory `/opt/kobuki/debug/build'
[ 74%] make[3]: Entering directory `/opt/kobuki/debug/build'
Generating C++ code from kobuki_msgs/AutoDockingActionFeedback.msg
[ 75%] Building CXX object
[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionGoal.msg
[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionResult.msg
In file included from
fatal error: kobuki_msgs/AutoDockingGoal.h: No such file or directory
compilation terminated.
[ 77%] Generating C++ code from kobuki_msgs/AutoDockingFeedback.msg
[ 78%] Generating C++ code from kobuki_msgs/AutoDockingGoal.msg
[ 80%] Building CXX object
[ 81%] Generating C++ code from kobuki_msgs/AutoDockingResult.msg
make[3]: Leaving directory `/opt/kobuki/debug/build'
[ 81%] Built target kobuki_msgs_gencpp

Now, the package.xml and CMakeLists.txt make all the appropriate
dependencies on kobuki_msgs, but the kobuki_msgs_gencpp target is simply
not getting added as a dependency to kobuki_auto_docking_ros. Now, this
fixes itself if you add the following line in CMakeLists.txt:

add_dependencies(kobuki_auto_docking_ros kobuki_msgs_gencpp)

Is this supposed to work like this? I don't know if it's possible or
'correct' to get the catkin model to do this anywhere automatically, but I
have to admit, it feels awkward having to handle dependencies now. You have
to remember to track them in several places - i.e. in package.xml, in
find_package, in CATKIN_DEPENDS and now here also.


PS I have a simple std_msgs/talker example of the above if necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-release/attachments/20130208/5f2487d0/attachment-0008.html>

More information about the Ros-release mailing list