ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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

@jarvisschultz Where is the evidence that rosmake was deprecated? In its official ROS Wiki, the status is maintained, and no mention about the deprecation. Of course I know catkin_make is much more popular, though.

akihiko gravatar image akihiko  ( 2021-10-20 23:27:46 -0500 )edit

@akihiko Maybe deprecation is too strong of a word, but referring to catkin as merely "popular" seems too weak. I suppose you are correct that rosmake could still potentially work because under-the-hood it uses rospack which works with both rosbuild and catkin packages. It would have been more correct for me to say rosbuild is deprecated. I tend to think of rosmake as a rosbuild-specific tool, but thinking about it more that is not quite right. All that said, I'm still of the opinion that you would want a compelling reason to use rosmake over catkin_make in a ROS1 distribution newer than Indigo.

jarvisschultz gravatar image jarvisschultz  ( 2021-10-21 09:58:11 -0500 )edit
1

rosmake cannot build Catkin packages.

That immediately makes it unusable on any recent ROS distribution.

It's certainly deprecated -- perhaps if only already de facto.

gvdhoorn gravatar image gvdhoorn  ( 2021-10-21 10:01:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

Question Tools

1 follower

Stats

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

Seen: 423 times

Last updated: Aug 24 '20