Ask Your Question
0

circular dependency

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

Penny gravatar image

updated 2014-04-20 14:09:20 -0500

ngrennan 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
3

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

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 imagetfoote ( 2012-04-09 17:45:00 -0500 )edit
2

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

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 imagePenny ( 2012-01-16 21:40:53 -0500 )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 imagedornhege ( 2012-01-16 22:00:18 -0500 )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 imagePenny ( 2012-01-16 23:41:10 -0500 )edit
something seems to be broken. maybe start with roswtf --all, ROS_ROOT, ROS_PACKAGE_PATH.
dornhege gravatar imagedornhege ( 2012-01-17 00:18:29 -0500 )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 imagePenny ( 2012-01-17 01:01:09 -0500 )edit
also each time I run rosmake this error appears: The error: RuntimeError: maximum recursion depth exceeded in cmp
Penny gravatar imagePenny ( 2012-01-17 01:01:10 -0500 )edit
That could very well be the reason.
dornhege gravatar imagedornhege ( 2012-01-17 03:33:40 -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

Stats

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

Seen: 2,148 times

Last updated: Jan 12 '12