Ask Your Question

rosmake error [melodic - ubuntu 18.04]

asked 2020-08-22 17:34:22 -0500

hamidreza gravatar image

updated 2020-08-24 15:12:44 -0500

Dear all,

I recently faced with the following error whenever I run rosmake * to build a set of packages using rosbuild

Exception in thread 6:
Traceback (most recent call last):
  File "/usr/lib/python2.7/", line 801, in __bootstrap_inner
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/", line 161, in run
    (result, result_string) =, self.argument, self.build_queue.robust_build)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/", line 436, in build
    warning_dict = warnings.analyze()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/", line 41, in analyze
    return {(t, self.byType(t)) for t, p in self._warning_pattern_map.items()}
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/", line 41, in <setcomp>
    return {(t, self.byType(t)) for t, p in self._warning_pattern_map.items()}
TypeError: unhashable type: 'list'

I am using ROS melodic in Ubuntu 18.04 :


It should be noted that I can make the packages if I do roscd to the package and then "make" it.
I even installed fresh ubuntu but it was not helpful. Does anyone encounter this issue before?

* [update] I confirmed that it happened after updating the ubuntu by sudo apt-get update && sudo apt-get dist-upgrade



edit retag flag offensive close merge delete



As a quick sanity check... why are you using rosmake with melodic and Ubuntu 18.04? Rosmake was deprecated a long time ago in favor of catkin. Rather than debugging some strange issue with a long-deprecated tool, just want to understand why you are even attempting rosmake.

jarvisschultz gravatar image jarvisschultz  ( 2020-08-24 15:57:33 -0500 )edit

@jarvisschultz, we have a very big cognitive robotic system, most of the packages have been developed based on the catkin building system, while there are still several rosbuild-based tool packages.

hamidreza gravatar image hamidreza  ( 2020-08-24 16:29:28 -0500 )edit

Sounds good. Just wanted to make sure you really needed to debug the rosmake problem

jarvisschultz gravatar image jarvisschultz  ( 2020-08-24 18:07:55 -0500 )edit

Glad you were able to fix it! The ros/ros GitHub repo would be the proper place to submit a bug report, or preferably, a PR to fix the issue.

jarvisschultz gravatar image jarvisschultz  ( 2020-08-25 08:33:22 -0500 )edit

BTW, I updated your comment to be an answer so that this question now shows up as answered. If you do submit a bug or a PR, it would be good to add a comment here linking that issue/PR

jarvisschultz gravatar image jarvisschultz  ( 2020-08-25 08:34:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-08-25 07:24:41 -0500

hamidreza gravatar image

@jarvisschultz, we found and solved the problem, The analyze() function in /opt/ros/melodic/lib/python2.7/dist-packages/rosmake/ file causes the problem. It uses the { } in the return expression to unhash tuples, but the tuples should contain only strings, numbers, or tuples. In some cases, the tuples contain empty lists that are unhashable and therefore cause the problem.

    def analyze(self):
    """Get dictionary of classified warnings.

    @return A dictionary of lists of warning messages indexed by the warning type
    @rtype {str:[str]}
    return {(t, self.byType(t)) for t, p in self._warning_pattern_map.items()}

We fixed it by updating the last line as:

  return dict((t, self.byType(t)) for t, p in self._warning_pattern_map.items())

all packages compiled without problems. should we mention this point somewhere to be corrected in the next update of melodic?

Thanks, Hamidreza

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-08-22 17:34:22 -0500

Seen: 133 times

Last updated: Aug 24 '20