Probably should have sent this to the buildsystem sig list. Only got caught up here being in the midst of a release frenzy again ;) Ignore this one, I'll repost at the buildsystem sig. On 8 February 2013 17:04, Daniel Stonier wrote: > > 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 time. > > 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 > kobuki/kobuki_auto_docking/CMakeFiles/kobuki_auto_docking_ros.dir/src/auto_docking_ros.cpp.o > 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 > kobuki/kobuki_bumper2pc/CMakeFiles/kobuki_bumper2pc_nodelet.dir/src/kobuki_bumper2pc.cpp.o > [ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionGoal.msg > [ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionResult.msg > In file included from > /opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingAction.h:51:0, > from > /opt/kobuki/src/kobuki/kobuki_auto_docking/include/kobuki_auto_docking/auto_docking_ros.hpp:22, > from > /opt/kobuki/src/kobuki/kobuki_auto_docking/src/auto_docking_ros.cpp:13: > /opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingActionGoal.h:53:41: > 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 > kobuki/kobuki_driver/src/driver/CMakeFiles/kobuki.dir/core_sensors.cpp.o > [ 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. > > Daniel. > > PS I have a simple std_msgs/talker example of the above if necessary. > > -- Phone : +82-10-5400-3296 (010-5400-3296) Home: http://snorriheim.dnsdojo.com/ Yujin R&D: http://rnd.yujinrobot.com/