catkin_make started failing to generate .h from .msg
I have a C++
pkg that used to build successfully by cakin_make
. But recently building starts to fail often, not always, with an error message:
~/catkinws_prv:$ rm -fR build/ devel/
~/catkinws_prv:$ catkin_make -j2
:
~/catkinws_prv/src/rqt_common_plugins/rqt_marble/src/rqt_marble/bridge_ros_marble.cpp:39:33: fatal error: rqt_marble/RouteGps.h: No such file or directory
compilation terminated.
Scanning dependencies of target rqt_marble_gencpp
[ 55%] Generating C++ code from rqt_marble/RouteGps.msg
[ 55%] Built target rqt_marble_gencpp
Scanning dependencies of target rqt_marble_genlisp
[ 61%] Generating Lisp code from rqt_marble/RouteGps.msg
[ 61%] Built target rqt_marble_genlisp
Scanning dependencies of target rqt_marble_genpy
[ 66%] Generating Python from MSG rqt_marble/RouteGps
[ 72%] Generating Python msg __init__.py for rqt_marble
[ 72%] Built target rqt_marble_genpy
[ 77%] Building CXX object rqt_common_plugins/rqt_marble/CMakeFiles/rqt_marble.dir/include/rqt_marble/moc_bridge_ros_marble.cxx.o
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [rqt_common_plugins/rqt_marble/CMakeFiles/rqt_marble.dir/src/rqt_marble/bridge_ros_marble.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [rqt_common_plugins/rqt_marble/CMakeFiles/rqt_marble.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
Direct cause of the problem is clear: RouteGps.h
is not generated from RouteGps.msg
. But why?
System dependency should be correctly installed (as I said, catkin_make
sometimes passes).
Because of this line in the error message above,
The bug is not reproducible, so it is likely a hardware or OS problem.
I thought my machine may have an issue, but as I cite later, the similar error occurs on buildfarm
.
I first suspected my recent commits do something wrong, but even the commit that built well like this initial commit fails with the same error.
Anything wrong?
$ dpkg -p ros-groovy-catkin
Version: 0.5.65-3quantal-20130325-0722-+0000
$ dpkg -p python-catkin-pkg
Version: 0.1.11-1
And although I'm not sure the correlation, Jenkins
has also started returning similar error (with my latest commit):
In file included from /tmp/test_repositories/src_repository/rqt_common_plugins/rqt_marble/include/rqt_marble/marble_plugin.h:42:0,
from /tmp/test_repositories/src_repository/rqt_common_plugins/rqt_marble/src/rqt_marble/marble_plugin.cpp:48:
/tmp/test_repositories/src_repository/rqt_common_plugins/rqt_marble/include/rqt_marble/bridge_ros_marble.h:12:33: fatal error: rqt_marble/RouteGps.h: No such file or directory
Update 5/7/2013) After adding add_dependencies
I still saw the same issue. Eventually I moved a .msg
file to another pkg and so far it builds nicely. The link that @Chad Rockey shared helped.
Update 5/14/13) Have been built fine locally, but jenkins
has kept failing for the last 2 weeks, complaining the .h
file from .msg
is not found, although the console output implies it is built. I opened up a new question for this.
Keeping all your messages in a separate package is a good idea, anyway.
I can't discern your package dependency tree from the question. Perhaps there is a third intermediate package that also requires
add_dependencies()
?@joq I've moved the latest update to new question, and there we've found that I forgot to include a depended pkg in
find_package
.