Modify

Opened 22 months ago

Last modified 19 months ago

#22226 new defect

False recursive dependency when using conditional dependency

Reported by: ilario Owned by: developers
Priority: normal Milestone:
Component: toolchain Version: Chaos Calmer 15.05
Keywords: Cc:

Description

Hi!
I was introducing some conditional dependencies (working on Libre-Mesh firmware) while I got an error about a "recursive dependency".
I created a dummy repository as a minimal working example for obtaining this error:

https://github.com/ilario/testing-openwrt-conditional-dependencies

after adding it in feeds.conf, updating and installing packages, when I run

make menuconfig

I get the following error:

 error: recursive dependency detected!
         symbol PACKAGE_dummyfirst is selected by PACKAGE_dummysecond
         symbol PACKAGE_dummysecond is selected by PACKAGE_dummyfirst

the dependencies are set in this way:

dummysecond selects dummyfirst
dummythird selects dummysecond if dummyfirst is selected (this is the conditional dependency)

The real situation where this happened was introduced by this line:

https://github.com/ilario/lime-packages/commit/c629fb354127cfc2be5401fb8df7ec5b0cbb934d#diff-f00e963b6edf5ef1785f84d7b66ccbe9R23

It's coded this way because batman-adv-auto-gw-mode package is thought to be Libre-Mesh independent, so no direct dependency from lime-* packages was introduced.
But when used in Libre-Mesh environment (which is, when lime-system is selected) it requires lime-proto-batadv.

This dependency looks legitimate to me.
Thanks,
Ilario

Attachments (0)

Change History (3)

comment:1 in reply to: ↑ description ; follow-up: Changed 22 months ago by hnyman

Replying to ilario:

make menuconfig

I get the following error:

 error: recursive dependency detected!
         symbol PACKAGE_dummyfirst is selected by PACKAGE_dummysecond
         symbol PACKAGE_dummysecond is selected by PACKAGE_dummyfirst

the dependencies are set in this way:

dummysecond selects dummyfirst
dummythird selects dummysecond if dummyfirst is selected (this is the conditional dependency)

That looks like a real circular dependency that dummythird creates. Placing it behind a conditional does not change the circular nature.

comment:2 in reply to: ↑ 1 Changed 22 months ago by ilario

Replying to hnyman:

Replying to ilario:

dummysecond selects dummyfirst
dummythird selects dummysecond if dummyfirst is selected (this is the conditional dependency)

That looks like a real circular dependency that dummythird creates. Placing it behind a conditional does not change the circular nature.

Ah, I didn't know how huge was the definition of circular dependency.
Anyway the reported dependency set prints an error but the behavior of menuconfig is exactly the one I desired.

Trying to workaround the problem I noticed that substituting the line in dummythird/Makefile from

DEPENDS:=+PACKAGE_dummyfirst:dummysecond

to

DEPENDS:=PACKAGE_dummyfirst:dummysecond

(which I suppose is supported also, correct?) doesn't print any error but results in a quite strange behavior in menuconfig.
Thanks

comment:3 Changed 19 months ago by ilario

At Libre-Mesh we still think it's not a recursive dependency, we're using it in our code and, apart from the printed errors, the menuconfig seems working and produces a .config file as desired.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.