ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

ROS2 Build Failure on Ubuntu1604

Hi, I am following the instructions for building ROS2, and get a build failure for rosidl_generator_py:

$ src/ament/ament_tools/scripts/ build --build-tests --symlink-install

… Lots of stuff builds

+++ Building ‘rosidl_generator_py’
==> ‘. /home/steve/ros2_ws/build/rosidl_generator_py/ && /usr/bin/make cmake_check_build_system’ in ‘/home/steve/ros2_ws/build/rosidl_generator_py’
==> ‘. /home/steve/ros2_ws/build/rosidl_generator_py/ && /usr/bin/make -j4 -l4’ in ‘/home/steve/ros2_ws/build/rosidl_generator_py’
[ 4%] Built target rosidl_generator_py__cpp
[ 4%] Generating Python code for ROS interfaces
[ 20%] Built target rosidl_generator_py__rosidl_generator_c
[ 36%] Built target rosidl_generator_py__rosidl_typesupport_introspection_c
[ 52%] Built target rosidl_generator_py__rosidl_typesupport_introspection_cpp
[ 68%] Built target rosidl_generator_py__rosidl_typesupport_c
Scanning dependencies of target rosidl_generator_py
[ 68%] Built target rosidl_generator_py
Traceback (most recent call last):
File “/home/steve/ros2_ws/src/ros2/rosidl/rosidl_generator_py/bin/rosidl_generator_py”, line 40, in
File “/home/steve/ros2_ws/src/ros2/rosidl/rosidl_generator_py/bin/rosidl_generator_py”, line 36, in main
return generate_py(args.generator_arguments_file, args.typesupport_impls.split(’;’))
File “/opt/ros/r2b2/lib/python3.5/site-packages/rosidl_generator_py/”, line 50, in generate_py
assert os.path.exists(template_file), 'Could not find template: ’ + template_file
AssertionError: Could not find template: /home/steve/ros2_ws/src/ros2/rosidl/rosidl_generator_py/resource/_msg_support.entry_point.c.em
rosidl_generator_py__py/CMakeFiles/rosidl_generator_py__py.dir/build.make:85: recipe for target ‘rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c’ failed
make[2]: *** [rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c] Error 1
CMakeFiles/Makefile2:1317: recipe for target ‘rosidl_generator_py__py/CMakeFiles/rosidl_generator_py__py.dir/all’ failed
make[1]: *** [rosidl_generator_py__py/CMakeFiles/rosidl_generator_py__py.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2

Looking in the source there is no template file: /home/steve/ros2_ws/src/ros2/rosidl/rosidl_generator_py/resource/_msg_support.entry_point.c.em

Any ideas?

Did you build ros 2 from source ?

I used the steps mentioned here ( to the core and found no issues like this while installing ros 2 in ubuntu 16.04 ( both in a native system as well as oracle virtualbox environment).

Try re-installing again from the source.

Works now, looks like ros2.repos I was using has changed/been updated (was following this link earlier in the week).

Thanks for the help.

Cheers Steve.