# Circular dependency causing application not to run

**URL:** <https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692>\
**Category:** Uncategorized\
**Created:** [April 2, 2021, 5:29pm UTC](https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692 "2021-04-02T17:29:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal.Gupta](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@Vishal.Gupta](https://forum.legato.io/u/Vishal.Gupta)\
**Post date:** [April 2, 2021, 5:29pm UTC](https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692/1 "2021-04-02T17:29:49Z")

</div>

Hello,

I have below apps and components.

A.adef

- c1 (provides b1.api)  
-c2 (requires d1.api and provides e1.api)  
-c3 (provides b1.api and d1.api and requires e1.api)

B.adef  
-c4 (requires c1.api and a1.api)  
-c5 (provides a1.api requires b1.api)  
-c6 (provides c1.api)

Both apps compiles just fine, but when running them I am seeing there are few WAITING CLIENTS  
in sdir list which causing application A not to run.

Is there any better way of accomplishing IPC in legato rather than exposing APIs between each components and Applications to talk to each other as exposing APIs for everything is introducing more and more complexity and its running into circular dependency.

Thanks  
Vishal

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 6, 2021, 9:36am UTC](https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692/2 "2021-04-06T09:36:18Z")

</div>

How about building one more app?

---

<div class="post-metadata">

**Author:** ![Vishal.Gupta](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@Vishal.Gupta](https://forum.legato.io/u/Vishal.Gupta)\
**Post date:** [April 6, 2021, 6:53pm UTC](https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692/3 "2021-04-06T18:53:38Z")

</div>

How it will resolve circular dependency ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [April 6, 2021, 11:12pm UTC](https://forum.legato.io/t/circular-dependency-causing-application-not-to-run/5692/4 "2021-04-06T23:12:43Z")

</div>

I think you need to combine

-c2 (requires d1.api and provides e1.api)  
-c3 (provides b1.api and d1.api and requires e1.api)
