Rosanswers logo

I'm interested in working with rclcpp, so I've decided to install ROS2 (Dashing) by building it from source, on a system with a fresh upgrade to Ubuntu 19.10 eoan. I am using this guide from ros.org to do so. However, I simply cannot manage to successfully build ROS2. The following problems I have encountered are:

  1. Install development tools and ROS tools: I was unable to succesfully run sudo apt install python3-colcon-common-extensions. It returned with E: Unable to locate package python3-colcon-common-extensions.

    Workaround: I obtained colcon using pip3 install -U colcon-common-extensions. I then added it to my PATH environment variable

  2. Install dependencies using rosdep: Running rosdep install --from-paths src --ignore-src --rosdistro dashing -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers" yielded the following output: ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: rosidl_parser: No definition of [python3-lark-parser] for OS version [eoan]

    I was able to install python3-lark-parser through pip3 however, and hoped that sorted out the problem.

  3. Building: Running colcon build --symlink-install yields:

    • Summary: 169 packages finished [13min 11s]
    • 1 package failed: rviz_rendering
    • 5 packages aborted: diagnostic_msgs rclcpp sensor_msgs shape_msgs visualization_msgs
    • 23 packages had stderr output: actionlib_msgs composition_interfaces diagnostic_msgs fastrtps geometry_msgs lifecycle_msgs nav_msgs qt_gui_cpp rcl_interfaces rmw_connext_cpp rmw_connext_shared_cpp rmw_fastrtps_shared_cpp rmw_opensplice_cpp rosidl_generator_py rosidl_typesupport_connext_c rosidl_typesupport_connext_cpp rviz_rendering sensor_msgs std_msgs std_srvs test_msgs tf2_msgs visualization_msgs
    • 96 packages not processed

After this I was unable to do anything to try and repair my installation. I unfortunately feel a bit overwhelmed by the amount of dependencies and what I perceive to be the complexity of the ROS2 build process.

Are there any measures I can take to repair my installation and get ROS2 working?

Originally posted by cxrandolph on ROS Answers with karma: 7 on 2020-03-04

Post score: 0

Original comments

Comment by gvdhoorn on 2020-03-04:\

so I've decided to install ROS2 (Dashing)

can you clarify why you're using an older version, instead of Eloquent?

Additionally: 19.04 is not an officially supported version of Ubuntu at this time for ROS 2, so running into some dependency issues seems like it would be expected.

Comment by cxrandolph on 2020-03-04:
I simply defaulted to Dashing as it was the distribution I've used in the past, but only via a docker image. I realize it is now illogical of me to have paired an older version of ROS with a newer unsupported version of Ubuntu. I can attempt to reinstall an older version of Ubuntu and repeat the procedure with a new version of ROS, but I'd rather avoid that if possible.

I was hopeful there might be some errors here other users recognize and have solutions for :s

Comment by gvdhoorn on 2020-03-04:
I would still recommend trying Eloquent, as I expect this to be the first thing you'll get as a question from the maintainers.

I was hopeful there might be some errors here other users recognize

You show two things:

  1. some dependency resolution problems, both of which are perhaps to be expected due to using an unsupported OS (but with pip work-around)
  2. a build output summary from Colcon. This doesn't tell us much, other than that rviz_rendering could not be build successfully. Without seeing the actual error(s), there isn't much to say about that, except that I can again see how that could fail, as rviz uses Ogre, which has a tendency to break things between Ubuntu releases

The RViz build failure then basically stops the entire build.

The other "23 packages with stderr output" should also get some attention, but focusing on one package first would probably be good.


1 Answer 1


Rosanswers logo

  1. and 2): this is the right workaround as these packages are released as debs only on the targeted Ubuntu versions (and eoan is not a targeted version).

  2. This comes from https://github.com/ros2/rviz/issues/402, as you are using a more recent version of GCC than the one on bionic, new warnings show up and cause the build to fail as RViz was using the -Werror flag.

a) Dashing: If you want to build dashing anyway.you can work around by either disabling the warning as listed in the issue description. Or remove the -Werror flag as in https://github.com/ros2/rviz/pull/420

b) Eloquent: If you build Eloquent, https://github.com/ros2/rviz/pull/420 is already part of eloquent so it will build without error.

Note that for Eloquent you will also have to install python packages by hand as they are not available from debs:

pip3 install rosdistro ifcfg 
rosdep install --from-paths src --ignore-src --rosdistro eloquent -y --skip-keys "console_bridge fastcdr fastrtps libopensplice67 libopensplice69 rti-connext-dds-5.3.1 urdfdom_headers python3-lark-parser python3-catkin-pkg-modules python3-ifcfg python3-rosdistro-modules"

Originally posted by marguedas with karma: 3606 on 2020-03-04

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by cxrandolph on 2020-03-04:
Okay. Following advice from marguedas for the rosdep workaround, combined with the flag --os=ubuntu:bionic to get around problems where it didn't recognize eoan, I was able to successfully complete the build. I also had to substitute:

wget https://raw.githubusercontent.com/ros2/ros2/dashing/ros2.repos


wget https://raw.githubusercontent.com/ros2/ros2/eloquent/ros2.repos

Finally, I had to run export ROS_DISTRO=eloquent to avoid some path related warnings from my previous attempt at installing dashing. For now things seem okay. I will update this if I find there are problems with the build after.

Thank you all so far for your assistance in getting this installed correctly. I really appreciate it!

I just hope the process for recompiling isn't 30m each time I edit a file :P

Comment by tfoote on 2020-03-04:\

Finally, I had to run export ROS_DISTRO=eloquent to avoid some path related warnings from my previous attempt at installing dashing. For now things seem okay. I will update this if I find there are problems with the build after.

This sounds like you are treating the symptom not the problem. You probably have something automatically sourcing the dashing setup, such as in your ~/.bashrc that you should clean up instead of just overriding the variable that we're checking. There's other things in the environment that might cause you issues if you don't clean it up.

Comment by cxrandolph on 2020-03-04:
@tfoote Good call with .bashrc. I've cleared it out, and removed some stuff in /opt/ that was also related to dashing.


Your Answer

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