0
$\begingroup$

Rosanswers logo

We are working with a pretty large catkin project that compiled just fine for months. Without code changes, we started seeing compile errors after some groovy updates and building from scratch, looking like:

[  2%] Building CXX object flor_common/flor_interactive_marker_server_custom/CMakeFiles/flor_interactive_marker_server_custom.dir/src/interactive_marker_server_custom.cpp.o
In file included from /home/kohlbrecher/flor_repo/catkin_ws/src/flor_common/flor_interactive_marker_server_custom/src/interactive_marker_server_custom.cpp:68:0:
/home/kohlbrecher/flor_repo/catkin_ws/src/flor_common/flor_interactive_marker_server_custom/include/flor_interactive_marker_server_custom/interactive_marker_server_custom.h:80:45: fatal error: flor_ocs_msgs/OCSTemplateUpdate.h: No such file or directory
compilation terminated.
make[2]: *** [flor_common/flor_interactive_marker_server_custom/CMakeFiles/flor_interactive_marker_server_custom.dir/src/interactive_marker_server_custom.cpp.o] Error 1
make[1]: *** [flor_common/flor_interactive_marker_server_custom/CMakeFiles/flor_interactive_marker_server_custom.dir/all] Error 2
make: *** [all] Error 2
make: INTERNAL: Exiting with 3 jobserver tokens available; should be 2!
Invoking "make" failed

Noticing that the actual error messages changed when executing "catkin_make" multiple times, I figured there might be some issue with parallel jobs and different timings leading to different errors. Sure enough, when running "catkin_make -j1", the project compiles. Any ideas if there's something on our side making this error appear, or if this is a catkin bug?


Originally posted by Stefan Kohlbrecher on ROS Answers with karma: 24361 on 2013-07-31

Post score: 3

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In the case of incompletely specified target dependencies you will face issues like the one you describe when building with multiple threads in parallel.

You should open tickets against the packages which lack proper dependencies and try to e.g. compile C++ code before the required message header have been generated.

The How-To http://ros.org/doc/groovy/api/catkin/html/howto/cpp_msg_dependencies.html should describe how the dependencies must be stated in CMake.

In the case of the posted example message that would be flor_interactive_marker_server_custom.


Originally posted by Dirk Thomas with karma: 16276 on 2013-07-31

This answer was ACCEPTED on the original site

Post score: 6


Original comments

Comment by Johannes Meyer on 2013-08-24:
Dirk, does this mean that beside the declaration in package.xml and in find_package(catkin ...) a dependency to ${catkin_EXPORTED_TARGETS} or flor_ocs_msgs_generate_messages_cpp has to be declared for every single target in each dependent package that uses the generated headers?!?

Comment by Dirk Thomas on 2013-08-24:
Yes, you need a target-level dependency between the target which uses the generated message headers and the target which generates the message headers.

Comment by 130s on 2014-09-23:
The link leads to not-found. For Hydro it's found here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.