Ask Your Question
0

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/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/parallel_build.py", line 161, in run
    (result, result_string) = self.rosmakeall.build(pkg, self.argument, self.build_queue.robust_build)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/engine.py", line 436, in build
    warning_dict = warnings.analyze()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rosmake/gcc_output_parse.py", 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/gcc_output_parse.py", 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 :

ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://localhost
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROSLISP_PACKAGE_DIRECTORIES=/home/hamidreza/universal_robot_ws/devel/share/common-lisp:/home/hamidreza/catkin_ws/devel/share/common-lisp
ROS_DISTRO=melodic

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

Thanks,

Hamidreza

edit retag flag offensive close merge delete

Comments

1

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
0

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/gcc_output_parse.py 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

Stats

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

Seen: 133 times

Last updated: Aug 24 '20