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

Can't compile with catkin_make

asked 2015-05-20 09:57:47 -0600

younes gravatar image

updated 2015-05-20 12:25:37 -0600

gvdhoorn gravatar image


I'd like to use catkin_make command to compile a package, So I create a folder src in my workspace with mkdir, then use catkin_init_workspace to initialize the package. But when runing catkin_make I obtain the following error even if my src folder is empty:

/opt/ros/indigo/share/catkin/cmake/em/order_packages.cmake.em:23: error: <type 'exceptions.RuntimeError'>: Multiple packages found with the same name "ros":
- ros
- share/ros
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/", line 3276, in <module>
    if __name__ == '__main__': main()
  File "/usr/lib/python2.7/dist-packages/", line 3274, in main
  File "/usr/lib/python2.7/dist-packages/", line 3257, in invoke
    interpreter.wrap(interpreter.file, (file, name))
  File "/usr/lib/python2.7/dist-packages/", line 2262, in wrap
  File "/usr/lib/python2.7/dist-packages/", line 2253, in wrap
  File "/usr/lib/python2.7/dist-packages/", line 2326, in file, done, locals)
  File "/usr/lib/python2.7/dist-packages/", line 2368, in safe
    self.parse(scanner, locals)
  File "/usr/lib/python2.7/dist-packages/", line 2388, in parse, locals)
  File "/usr/lib/python2.7/dist-packages/", line 1403, in run
    interpreter.execute(self.code, locals)
  File "/usr/lib/python2.7/dist-packages/", line 2565, in execute
    exec(statements, self.globals)
  File "<string>", line 17, in <module>
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/", line 111, in topological_order
    for path, package in find_packages(space).items():
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/", line 92, in find_packages
    raise RuntimeError('\n'.join(duplicates))
RuntimeError: Multiple packages found with the same name "ros":
- ros
- share/ros
CMake Error at /opt/ros/indigo/share/catkin/cmake/safe_execute_process.cmake:11 (message):

  "/usr/bin/python" "/usr/lib/python2.7/dist-packages/em.pyc" "--raw-errors"
  "-F" "/home/limiarf/catkin_ws/build/catkin_generated/"
  "-o" "/home/limiarf/catkin_ws/build/catkin_generated/order_packages.cmake"
  "/opt/ros/indigo/share/catkin/cmake/em/order_packages.cmake.em") returned
  error code 1
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/em_expand.cmake:25 (safe_execute_process)
  /opt/ros/indigo/share/catkin/cmake/catkin_workspace.cmake:29 (em_expand)
  CMakeLists.txt:63 (catkin_workspace)

-- Configuring incomplete, errors occurred!
See also "/home/limiarf/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/limiarf/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

What should I do?

Thanks Younès

edit retag flag offensive close merge delete


For future questions: please use the preformatted text button on the bar to format console copy/pastes. It's the button with 101010 on it.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-20 12:26:17 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2015-05-21 02:03:26 -0600

Arowana gravatar image

The error you get tells you something pretty clear :

Multiple packages found with the same name "ros":
- ros
- share/ros

Did you try to investigate that? It should be a conflict.

edit flag offensive delete link more

answered 2015-05-23 05:59:28 -0600

younes gravatar image

It's OK. I arrive to run my package by resolving the conflicts. Thanks

edit flag offensive delete link more


Please tell us how you 'resolved the conflicts', so future readers can benefit from your solution.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-23 06:18:24 -0600 )edit

I removed /opt/ros/indigo/ros folder that contains another package created before: sudo rm -r /opt/ros/indigo/ros Then I can run catkin_make

younes gravatar image younes  ( 2015-05-23 06:39:46 -0600 )edit

I'd recommend in general to never do anything in /opt/ros/$distro, ever. It's read-only for non-super-users for a reason.

gvdhoorn gravatar image gvdhoorn  ( 2015-05-23 08:18:33 -0600 )edit

I run the command source source /opt/ros/indigo/setup.bash source /opt/ros/indigo/setup.bash and source :~/catkin_ws/devel/setup.bash

younes gravatar image younes  ( 2015-08-31 07:37:41 -0600 )edit

Question Tools

1 follower


Asked: 2015-05-20 09:57:47 -0600

Seen: 1,529 times

Last updated: May 23 '15