Building ROS2 master on Ubuntu 16 fails

Trying to build master of ROS2 on my ubuntu box as of this morning and I’m getting a following failure. Any idea what might be wrong and how to fix it?

+++ Building ‘rosidl_generator_py’
==> ‘. /home/breh/ros2_wsx/build/rosidl_generator_py/cmake__build.sh && /usr/bin/make cmake_check_build_system’ in ‘/home/breh/ros2_wsx/build/rosidl_generator_py’
==> ‘. /home/breh/ros2_wsx/build/rosidl_generator_py/cmake__build.sh && /usr/bin/make -j2 -l2’ in ‘/home/breh/ros2_wsx/build/rosidl_generator_py’
[ 2%] Generating Python code for ROS interfaces
[ 18%] Built target rosidl_generator_py__rosidl_generator_c
[ 20%] Built target rosidl_generator_py__cpp
[ 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
[ 68%] Built target rosidl_generator_py
[ 68%] Built target rosidl_generator_py__py
Scanning dependencies of target rosidl_generator_py__rosidl_typesupport_c__pyext
make[2]: *** No rule to make target ‘rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c’, needed by ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_c.c.o’. Stop.
CMakeFiles/Makefile2:1134: recipe for target ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/all’ failed
make[1]: *** [CMakeFiles/rosidl_generator_py__rosidl_typesupport_c__pyext.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs…
Scanning dependencies of target rosidl_generator_py__rosidl_typesupport_introspection_c__pyext
make[2]: *** No rule to make target ‘rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_introspection_c.c’, needed by ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/rosidl_generator_py/rosidl_generator_py/_rosidl_generator_py_s.ep.rosidl_typesupport_introspection_c.c.o’. Stop.
CMakeFiles/Makefile2:71: recipe for target ‘CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/all’ failed
make[1]: *** [CMakeFiles/rosidl_generator_py__rosidl_typesupport_introspection_c__pyext.dir/all] Error 2
Makefile:138: recipe for target ‘all’ failed
make: *** [all] Error 2

Hi,
I can’t reproduce your bug on my debian testing. How do you keep your workspace up to date? Switched to the master branches on all repositories and calling vcs pull src on a regular base? This can lead to problems if a repository was renamed or moved.

I’m attaching my repos list to this post.
Did you already try deleting the build an install folder and rebuilding ros2 afterwards?

My repos list:

repositories:
ament/ament_cmake:
type: git
url: GitHub - ament/ament_cmake: Supporting CMake packages for working with ament
version: master
ament/ament_cmake_ros:
type: git
url: GitHub - ros2/ament_cmake_ros
version: master
ament/ament_index:
type: git
url: GitHub - ament/ament_index
version: master
ament/ament_lint:
type: git
url: GitHub - ament/ament_lint
version: master
ament/ament_package:
type: git
url: GitHub - ament/ament_package: Shell script templates used to create ament workspaces.
version: master
ament/ament_tools:
type: git
url: GitHub - ament/ament_tools: Command line tools for working with ament
version: master
ament/gmock_vendor:
type: git
url: GitHub - ament/gmock_vendor
version: master
ament/gtest_vendor:
type: git
url: GitHub - ament/gtest_vendor
version: master
ament/osrf_pycommon:
type: git
url: GitHub - osrf/osrf_pycommon: Commonly needed Python modules, used by Python software developed at OSRF
version: master
ament/uncrustify:
type: git
url: GitHub - ament/uncrustify: Code beautifier
version: master
eProsima/Fast-CDR:
type: git
url: GitHub - eProsima/Fast-CDR: eProsima FastCDR library provides two serialization mechanisms. One is the standard CDR serialization mechanism, while the other is a faster implementation of it. Looking for commercial support? Contact info@eprosima.com
version: master
eProsima/Fast-RTPS:
type: git
url: GitHub - eProsima/Fast-DDS: The most complete DDS - Proven: Plenty of success cases. Looking for commercial support? Contact info@eprosima.com
version: master
ros/class_loader:
type: git
url: GitHub - ros/class_loader: ROS-independent library for dynamic class (i.e. plugin) introspection and loading from runtime libraries
version: ros2
ros/geometry2:
type: git
url: GitHub - ros2/geometry2: A set of ROS packages for keeping track of coordinate transforms.
version: ros2
ros/orocos_kinematics_dynamics:
type: git
url: GitHub - ros2/orocos_kinematics_dynamics: Orocos Kinematics and Dynamics C++ library
version: ros2
ros/poco_vendor:
type: git
url: GitHub - ros2/poco_vendor: CMake shim over the poco library: https://github.com/pocoproject/poco
version: master
ros2/c_utilities:
type: git
url: GitHub - ros2/rcutils: Common C functions and data structures used in ROS 2
version: master
ros2/cli_tools:
type: git
url: https://github.com/ros2/cli_tools
version: master
ros2/common_interfaces:
type: git
url: GitHub - ros2/common_interfaces: A set of packages which contain common interface files (.msg and .srv).
version: master
ros2/demos:
type: git
url: GitHub - ros2/demos
version: master
ros2/example_interfaces:
type: git
url: GitHub - ros2/example_interfaces: Msg, Srv, etc. ROS interfaces used in examples
version: master
ros2/examples:
type: git
url: GitHub - ros2/examples: Example packages for ROS 2
version: master
ros2/launch:
type: git
url: GitHub - ros2/launch: Tools for launching multiple processes and for writing tests involving multiple processes.
version: master
ros2/rcl:
type: git
url: GitHub - ros2/rcl: Library to support implementation of language specific ROS Client Libraries.
version: master
ros2/rcl_interfaces:
type: git
url: GitHub - ros2/rcl_interfaces: A repository for messages and services used by the ROS client libraries
version: master
ros2/rclcpp:
type: git
url: GitHub - ros2/rclcpp: rclcpp (ROS Client Library for C++)
version: master
ros2/rclpy:
type: git
url: GitHub - ros2/rclpy: rclpy (ROS Client Library for Python)
version: master
ros2/realtime_support:
type: git
url: GitHub - ros2/realtime_support: Minimal real-time testing utility for measuring jitter and latency.
version: master
ros2/rmw:
type: git
url: GitHub - ros2/rmw: The ROS Middleware (rmw) Interface.
version: master
ros2/rmw_connext:
type: git
url: GitHub - ros2/rmw_connext: Implementation of the ROS Middleware (rmw) Interface using RTI's Connext DDS.
version: master
ros2/rmw_fastrtps:
type: git
url: GitHub - ros2/rmw_fastrtps: Implementation of the ROS Middleware (rmw) Interface using eProsima's Fast RTPS.
version: master
ros2/rmw_implementation:
type: git
url: GitHub - ros2/rmw_implementation: CMake infrastructure and dependencies for rmw implementations
version: master
ros2/rmw_opensplice:
type: git
url: GitHub - ros2/rmw_opensplice: Implementation of the ROS Middleware (rmw) interface using PrismTech's OpenSplice DDS.
version: master
ros2/ros1_bridge:
type: git
url: GitHub - ros2/ros1_bridge: ROS 2 package that provides bidirectional communication between ROS 1 and ROS 2
version: master
ros2/rosidl:
type: git
url: GitHub - ros2/rosidl: Packages which provide the ROS IDL (.msg) definition and code generation.
version: master
ros2/rosidl_dds:
type: git
url: GitHub - ros2/rosidl_dds
version: master
ros2/rosidl_typesupport:
type: git
url: GitHub - ros2/rosidl_typesupport: Packages which provide the typesupport for ROS messages and services
version: master
ros2/system_tests:
type: git
url: GitHub - ros2/system_tests
version: master
ros2/tlsf:
type: git
url: https://github.com/ros2/tlsf.git
version: master
vendor/console_bridge:
type: git
url: https://github.com/ros/console_bridge.git
version: master

Well, I did a fresh checkout and got a list of repositories from here: https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos as recommended in this document: GitHub - ros2/ros2: The Robot Operating System, is a meta operating system for robots.

What is interesting, the list on the link above is different from the list you sent. Where did you get yours from?

Also tried your repo list, unfortunately the build fails for me with the same problem. Have you tried a fresh workspace build?

I tried a fresh build in a container yesterday evening and could not reproduce this issue.
Just to clarify, did you try to remove your build folder before recompiling ?
Do you have the exact same error after your fresh checkout ?
If you run vcs status --hide in your source directory, do you have any outstanding changes on this packages or its dependencies?

Hmm, really weird. It was a complete fresh checkout. Created a new directory, new src, imported the repositories and ran ament. When I do the same thing with beta1 (different workspace, but clean checkout as well), everything compiles fine. However master fails with the error above.

I’m using cmake version 3.5.1
python: Python 2.7.12
python3: Python 3.5.2

vcs status --hide shows nothing …

My repos.list is just taken with vcs export src > ros2.txt from a working setup. Perhaps recheck the dependencies. I might be that the depedencies have changed since you did your original setup.

Just to make sure: you did the following steps:

delete your old workspace,
create new one either with my repos.list or the one from the wiki,
build the workspace with the commands from the wiki?

Did you get any different error with my repos.list ?

I’m repeating again - it is a complete fresh checkout and repos are taken from https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos as recommended in this document: GitHub - ros2/ros2: The Robot Operating System, is a meta operating system for robots.

Is there any other document describing how to build master of ros2? Perhaps the list maintained in https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos is not correct?

Hmm that’s really weird.
I just did the exact same thing:

  1. create a new workspace: mkdir -p test_master_repos_ws/src && cd test_master_repos_ws
  2. wget https://raw.githubusercontent.com/ros2/ros2/master/ros2.repos
  3. vcs import src < ros2.repos
  4. run ament: src/ament/ament_tools/scripts/ament.py build --build-tests -s
    and everything built fine

This repo files is the one used by the buildfarm and it looks like all jobs built fine last night (http://ci.ros2.org/view/nightly/) so I doubt this is the problem.

The only thing I can see would be missing dependencies. Can you try to install all the packages listed in GitHub - ros2/ros2: The Robot Operating System, is a meta operating system for robots. ? there were a few changes since beta1.

Sorry I know you are repeating yourself, if installing all the dependencies don’t fix it, could you provide the list of commands you ran with the exact arguments rather than a description, that would make it easier to reproduce

Thanks!

Thanks for helping :). After going back and forth and trying all sorts of stuff, the problem turned out to be the shell I used - it was setup to ros2-beta1 workspace, i.e. it had AMENT_PREFIX_PATH, LD_LIBRARY_PATH and all sorts of other variables pointing to the previously built beta1 workspace.

The way to fix it was very simple - just opened a fresh shell without any ROS2 setup and the build from there works just fine.

Thanks again for all your assistance, I’m back in the game :slight_smile:

:slight_smile: glad you figured it out

Out of my own intellectual curiosity, I’d love to hear your approach to building and developing within containers. (In a new thread, or feel free to message me directly.)