openwrt / openwrt/openwrt

[Build] How to resolve `recursive dependency` error?

Open
#16,772 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
28.5k
Forks
13k
PR merge metrics
PR metrics pending

Description

This may not a BUG.

I want to add atlantic.ko to openwrt, so I add these code to package/kernel/linux/modules/netdevices.mk:


define KernelPackage/atlantic
  SUBMENU:=$(NETWORK_DEVICES_MENU)
  TITLE:=aQuantia AQtion(tm) Ethernet card support
  DEPENDS:=@PCI_SUPPORT @TARGET_x86_64 +kmod-ptp +(PACKAGE_kmod-macsec||PACKAGE_kmod-macsec=m):kmod-macsec
  KCONFIG:= \
	CONFIG_AQTION
  FILES:=$(LINUX_DIR)/drivers/net/ethernet/aquantia/atlantic/atlantic.ko
  AUTOLOAD:=$(call AutoProbe,atlantic)
endef

$(eval $(call KernelPackage,atlantic))

Then I run make menuconfig, it has a error:

tmp/.config-package.in:16587:error: recursive dependency detected!
tmp/.config-package.in:16587:   symbol PACKAGE_kmod-macsec is selected by PACKAGE_kmod-macsec
For a resolution refer to Documentation/kbuild/kconfig-language.rst
subsection "Kconfig recursive dependency limitations"

How to resolve that error?

My goal is to make kmod-atlantic depend on kmod-macsec when PACKAGE_kmod-macsec=y or PACKAGE_kmod-macsec=m.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with package/kernel/linux/modules/netdevices.mk and the generated tmp/.config-package.in entry for kmod-macsec. Read Documentation/kbuild/kconfig-language.rst, especially “Kconfig recursive dependency limitations,” then verify the dependency expression in make menuconfig. Done means kmod-atlantic can express the intended kmod-macsec dependency without a recursive-dependency error.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.