<div dir="ltr">Probably should have sent this to the buildsystem sig list. Only got caught up here being in the midst of a release frenzy again ;)<div><br></div><div style>Ignore this one, I'll repost at the buildsystem sig.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 8 February 2013 17:04, Daniel Stonier <span dir="ltr"><<a href="mailto:d.stonier@gmail.com" target="_blank">d.stonier@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br clear="all"><div>Hi all,</div><div><br></div><div>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.</div>

<div><br></div><div>Problem: package <i>kobuki_auto_docking</i> depends on actions in <i>kobuki_msgs </i>but when catkin building them together, the actions aren't getting built in time.</div><div><br>
</div><div><div><font color="#ff0000">Scanning dependencies of target kobuki_auto_docking_ros</font></div><div>[ 70%] Generating Python msg __init__.py for kobuki_msgs</div><div>[ 71%] Generating C++ code from kobuki_msgs/WheelDropEvent.msg</div>

<div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>[ 71%] Built target kobuki_msgs_genpy</div><div>[ 72%] make[3]: Entering directory `/opt/kobuki/debug/build'</div>

<div>Generating C++ code from kobuki_msgs/AutoDockingAction.msg</div><div><font color="#0000ff">[ 73%] Building CXX object kobuki/kobuki_auto_docking/CMakeFiles/kobuki_auto_docking_ros.dir/src/auto_docking_ros.cpp.o</font></div>

<div>make[3]: Entering directory `/opt/kobuki/debug/build'</div><div>Scanning dependencies of target kobuki_bumper2pc_nodelet</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div>[ 74%] make[3]: Entering directory `/opt/kobuki/debug/build'</div>

<div>Generating C++ code from kobuki_msgs/AutoDockingActionFeedback.msg</div><div>[ 75%] Building CXX object kobuki/kobuki_bumper2pc/CMakeFiles/kobuki_bumper2pc_nodelet.dir/src/kobuki_bumper2pc.cpp.o</div><div>[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionGoal.msg</div>

<div>[ 76%] Generating C++ code from kobuki_msgs/AutoDockingActionResult.msg</div><div>In file included from /opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingAction.h:51:0,</div><div>                 from /opt/kobuki/src/kobuki/kobuki_auto_docking/include/kobuki_auto_docking/auto_docking_ros.hpp:22,</div>

<div>                 from /opt/kobuki/src/kobuki/kobuki_auto_docking/src/auto_docking_ros.cpp:13:</div><div><font color="#ff0000">/opt/kobuki/debug/devel/include/kobuki_msgs/AutoDockingActionGoal.h:53:41: fatal error: kobuki_msgs/AutoDockingGoal.h: No such file or directory</font></div>

<div>compilation terminated.</div><div>[ 77%] Generating C++ code from kobuki_msgs/AutoDockingFeedback.msg</div><div>[ 78%] Generating C++ code from kobuki_msgs/AutoDockingGoal.msg</div><div>[ 80%] Building CXX object kobuki/kobuki_driver/src/driver/CMakeFiles/kobuki.dir/core_sensors.cpp.o</div>

<div>[ 81%] Generating C++ code from kobuki_msgs/AutoDockingResult.msg</div><div>make[3]: Leaving directory `/opt/kobuki/debug/build'</div><div><font color="#0000ff">[ 81%] Built target kobuki_msgs_gencpp</font></div>

<div><br></div></div><div>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:</div>

<div><br></div><div>add_dependencies(kobuki_auto_docking_ros kobuki_msgs_gencpp)<br></div><div><br></div><div>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.</div>
<span class="HOEnZb"><font color="#888888">
<div><br></div><div>Daniel.<br></div></font></span><div><br></div><div><div>PS I have a simple std_msgs/talker example of the above if necessary.</div><div><br></div></div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Phone : +82-10-5400-3296 (010-5400-3296)<br>Home: <a href="http://snorriheim.dnsdojo.com/" target="_blank">http://snorriheim.dnsdojo.com/</a><br><div>Yujin R&D: <a href="http://rnd.yujinrobot.com/" target="_blank">http://rnd.yujinrobot.com/<br>
</a><br></div>
</div>