ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Could not resolve the rosdep key 'catkin'

asked 2019-08-26 21:58:03 -0600

max-krichenbauer gravatar image

updated 2019-08-26 21:58:34 -0600

Hello!

Building packages on a local build farm (not my own packages, the same packages as in the official ROS distros), yesterday everything worked fine, but today, all build jobs fail with:

reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index http://mybuildfarm/rosdistro/index.yaml
Add distro "kinetic"
updated cache in /home/buildfarm/.ros/rosdep/sources.cache
Crawling for packages in workspace '/tmp/ws/src'

[INFO ABOUT THE PACKAGE TO BUILD]

Traceback (most recent call last):
  File "/tmp/ros_buildfarm/scripts/devel/create_devel_task_generator.py", line 272, in resolve_names
   rosdep_key, view, installer, os_name, os_code_name)
  File "/usr/lib/python3/dist-packages/rosdep2/catkin_support.py", line 87, in resolve_for_os
    d = view.lookup(rosdep_key)
  File "/usr/lib/python3/dist-packages/rosdep2/lookup.py", line 197, in lookup
   return self.rosdep_defs[rosdep_name]
KeyError: 'catkin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/ros_buildfarm/scripts/devel/create_devel_task_generator.py", line 288, in <module>
    main()
  File "/tmp/ros_buildfarm/scripts/devel/create_devel_task_generator.py", line 125, in main
    debian_pkg_names += resolve_names(['catkin'], **context)
  File "/tmp/ros_buildfarm/scripts/devel/create_devel_task_generator.py", line 275, in resolve_names
    "Could not resolve the rosdep key '%s'" % rosdep_key)
RuntimeError: Could not resolve the rosdep key 'catkin'

It seems like the build cannot find catkin.

I tried clearing cashes and deleting and re-creating all jobs but the problem persists.

I checked the prerequisites: repository as specified in index.yaml which is http://packages.ros.org/ros/ubuntu/ and there were some changes last night, but I cannot tell if they are related.

Does anyone have a clue what could be causing this?

Thanks for your time!

Best regards, Max

edit retag flag offensive close merge delete

Comments

1

Is the rosdistro you're building locally also called kinetic? If you've called it something else then your buildfarm is likely trying to install ros-$rosdistro-catkin instead of ros-kinetic-catkin.

nuclearsandwich gravatar image nuclearsandwich  ( 2019-08-27 13:14:30 -0600 )edit

@nuclearsandwich Thank you for the comment! I checked the job's xml files and they use as --rosdistro-index-url the correct server's index.yaml and the parameters kinetic default <package> ubuntu xenial amd64

In the index.yaml, the respective distribution.yaml is listed under the respective distributions' name, and the distribution.yaml is a copy of the official build farm's file.

EDIT: I also inserted a print-out into the offending create_devel_task_generator.py and it prints out kinetic as rosdistro_name too, so I don't think the issue is a wrong rosdistro name.

Am I mistaken that the distro server is used to both decide which packages to build and also as the repository for required packages?

max-krichenbauer gravatar image max-krichenbauer  ( 2019-08-27 18:56:06 -0600 )edit
1

If your local rosdistro is still called kinetic, them my next suspect is that your kinetic/distribution.yaml is missing packages (for example, catkin). Did you edit the distribution.yaml in order to prune which packages you were building on your buildfarm deployment?

nuclearsandwich gravatar image nuclearsandwich  ( 2019-08-28 11:24:36 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-08-28 22:40:23 -0600

max-krichenbauer gravatar image

updated 2019-08-29 00:56:28 -0600

Thanks to @nuclearsandwich for pointing me to the source of the issue: I wasn't aware even basic build tools like catkin need to be build first through distribution.yaml (instead of being used from the prerequisites: repositories defined in the ros_buildfarm_config's index.yaml.

catkin was actually also in the distribution list, but it failed to build for different reasons.

First it was /usr/bin/env: ‘python’: No such file or directory which I was able to work around by injecting ln -s /usr/bin/python3 /usr/bin/python into the docker file, then it failed because of not finding python-catkin-pkg or ImportError: No module named terminal_color so I injected installing python-catkin-pkg and python-catkin-pkg-modules as well. Eventually I figured there's probably another package which is expected to be build first which would install all the packages and configure the build environment, so I tried building ros first. It also failed, but it apparently prepared the docker environment enough for catkin to build. Now, other packages build as well.

tl;dr:

RuntimeError: Could not resolve the rosdep key indicates that this package should be built first.

The correct order seems to be cmake_modules => rospack => genmsg => roscpp_core => genpy =>message_runtime => ros => catkin => all other packages.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-08-26 21:58:03 -0600

Seen: 898 times

Last updated: Aug 29 '19