Ask Your Question
0

Can't compile with catkin_make

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

younes gravatar image

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

gvdhoorn gravatar image

Hello,

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/em.py", line 3276, in <module>
    if __name__ == '__main__': main()
  File "/usr/lib/python2.7/dist-packages/em.py", line 3274, in main
    invoke(sys.argv[1:])
  File "/usr/lib/python2.7/dist-packages/em.py", line 3257, in invoke
    interpreter.wrap(interpreter.file, (file, name))
  File "/usr/lib/python2.7/dist-packages/em.py", line 2262, in wrap
    self.fail(e)
  File "/usr/lib/python2.7/dist-packages/em.py", line 2253, in wrap
    callable(*args)
  File "/usr/lib/python2.7/dist-packages/em.py", line 2326, in file
    self.safe(scanner, done, locals)
  File "/usr/lib/python2.7/dist-packages/em.py", line 2368, in safe
    self.parse(scanner, locals)
  File "/usr/lib/python2.7/dist-packages/em.py", line 2388, in parse
    token.run(self, locals)
  File "/usr/lib/python2.7/dist-packages/em.py", line 1403, in run
    interpreter.execute(self.code, locals)
  File "/usr/lib/python2.7/dist-packages/em.py", line 2565, in execute
    exec(statements, self.globals)
  File "<string>", line 17, in <module>
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/topological_order.py", line 111, in topological_order
    for path, package in find_packages(space).items():
  File "/usr/lib/python2.7/dist-packages/catkin_pkg/packages.py", 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):

  execute_process(/home/limiarf/catkin_ws/build/catkin_generated/env_cached.sh
  "/usr/bin/python" "/usr/lib/python2.7/dist-packages/em.pyc" "--raw-errors"
  "-F" "/home/limiarf/catkin_ws/build/catkin_generated/order_packages.py"
  "-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

Comments

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 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

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

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
0

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

younes gravatar image

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

edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )edit
2

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 -0500 )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 -0500 )edit

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: 2015-05-20 09:57:47 -0500

Seen: 1,313 times

Last updated: May 23 '15