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

circular dependency

asked 2012-01-12 21:43:32 -0600

Penny gravatar image

updated 2023-03-12 09:42:05 -0600

lucasw gravatar image

Hi,

I have created a package and when I put the command line rosmake, I get this result. Where can I find this broken dependency?

[rospack] woah! expanding the dependency tree made it blow up.
 There must be a circular dependency somewhere.
[rospack] circular dependency


CMake Error at /opt/ros/electric/ros/core/rosbuild/public.cmake:125 (message):


  Failed to invoke rospack to get compile flags for package 'testing'.  Look
  above for errors from rospack itself.  Aborting.  Please fix the broken
  dependency!

Call Stack (most recent call first):
  /opt/ros/electric/ros/core/rosbuild/public.cmake:202 (rosbuild_invoke_rospack)
  CMakeLists.txt:12 (rosbuild_init)


-- Configuring incomplete, errors occurred!
make: *** [all] Error 1
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
4

answered 2012-01-12 22:35:07 -0600

Hansg91 gravatar image

As dornhege said, you most likely created at least two packages, and made them depend on eachother. Lets say you created packageA and packageB and made packageA depend on packageB and vice versa. What ros will try to do when you build packageA is first build all the depending packages of packageA, which includes packageB, so it builds packageB. To build packageB, it first builds all its dependencies, which includes packageA, so it wants to build packageA and at this point we are where we started again. This is what is called circular dependency.

Hope it helped.

edit flag offensive delete link more

Comments

Fix ticketed: https://code.ros.org/trac/ros/ticket/3919
In the meantime, you can do something like

rospack deps-indent my_package > foo

Ctrl-C it after a bit, then look at the file to try to figure out where things go off the rails.

tfoote gravatar image tfoote  ( 2012-04-09 17:45:00 -0600 )edit
2

answered 2012-01-12 22:27:01 -0600

dornhege gravatar image

Check the manifest of your package?

If you have any other packages created by yourself check those, too.

roswtf might also help.

edit flag offensive delete link more

Comments

I have only one package that I have created, I checked my manifest file and there is nothing wrong, the package depends on rospy, roscpp, and std_msgs. The command line roswtf just tells me that there is a circular dependency, nothing else, how can I fix this error?
Penny gravatar image Penny  ( 2012-01-16 21:40:53 -0600 )edit
Does this also happen when making other packages without yours in the package path? Otherwise, you will need to provide more information.
dornhege gravatar image dornhege  ( 2012-01-16 22:00:18 -0600 )edit
yes it happens to all the packages I have tried to create, even those without mine in the package path, what extra information should I provide?
Penny gravatar image Penny  ( 2012-01-16 23:41:10 -0600 )edit
something seems to be broken. maybe start with roswtf --all, ROS_ROOT, ROS_PACKAGE_PATH.
dornhege gravatar image dornhege  ( 2012-01-17 00:18:29 -0600 )edit
also each time I run rosmake this error appears: The error: RuntimeError: maximum recursion depth exceeded in cmp (I assume it relates with the circular dependency?)
Penny gravatar image Penny  ( 2012-01-17 01:01:09 -0600 )edit
also each time I run rosmake this error appears: The error: RuntimeError: maximum recursion depth exceeded in cmp
Penny gravatar image Penny  ( 2012-01-17 01:01:10 -0600 )edit
That could very well be the reason.
dornhege gravatar image dornhege  ( 2012-01-17 03:33:40 -0600 )edit

Question Tools

Stats

Asked: 2012-01-12 21:43:32 -0600

Seen: 4,141 times

Last updated: Mar 12 '23