2014-01-06 14:06:43

by Andreas Mohr

[permalink] [raw]
Subject: BUG: build fail due to dependency issue (LIB80211_CRYPT_* failed to depend on LIB80211)

Hi,

just had the following non-satisfactory build result here
(read: caused sizeable waste of time):


SORTEX vmlinux
SYSMAP System.map
Building modules, stage 2.
MODPOST 210 modules
ERROR: "lib80211_unregister_crypto_ops" [net/wireless/lib80211_crypt_wep.ko] undefined!
ERROR: "lib80211_register_crypto_ops" [net/wireless/lib80211_crypt_wep.ko] undefined!
ERROR: "lib80211_unregister_crypto_ops" [net/wireless/lib80211_crypt_tkip.ko] undefined!
ERROR: "lib80211_register_crypto_ops" [net/wireless/lib80211_crypt_tkip.ko] undefined!
ERROR: "lib80211_unregister_crypto_ops" [net/wireless/lib80211_crypt_ccmp.ko] undefined!
ERROR: "lib80211_register_crypto_ops" [net/wireless/lib80211_crypt_ccmp.ko] undefined!
make[5]: *** [__modpost] Error 1
make[4]: *** [modules] Error 2



This is due to net/wireless/Kconfig:


config LIB80211
tristate
default n
help
This options enables a library of common routines used
by IEEE802.11 wireless LAN drivers.

Drivers should select this themselves if needed.

config LIB80211_CRYPT_WEP
tristate

config LIB80211_CRYPT_CCMP
tristate

config LIB80211_CRYPT_TKIP
tristate

config LIB80211_DEBUG
bool "lib80211 debugging messages"
depends on LIB80211
default n
---help---
You can enable this if you want verbose debugging messages
from lib80211.


A
make menuconfig
showed these three crypt options rather very prominently,
yet with entry of LIB80211 proper nowhere to be seen,
thus it was very easy to fall into the trap of "enabling"
various crypto options, thereby "enabling" nice ultimate build failure.

And as you can see above as well, LIB80211_DEBUG decided to be
a law-abiding citizen, by caring to announce a proper dependency on LIB80211.


Happened on OpenWrt's 3.10.24, and verified Kconfig status to still be identical on linux trunk.

Thanks,

Andreas Mohr

--
GNU/Linux. It's not the software that's free, it's you.


2014-01-06 19:18:10

by Andreas Mohr

[permalink] [raw]
Subject: OpenWrt kernel_menuconfig issue? (was: Re: BUG: build fail due to dependency issue (LIB80211_CRYPT_* failed to depend on LIB80211))

Hi,

[CC openwrt-devel, remove linux-kernel]

On Mon, Jan 06, 2014 at 03:09:27PM +0100, Johannes Berg wrote:
> On Mon, 2014-01-06 at 15:01 +0100, Andreas Mohr wrote:
>
> > config LIB80211
> > tristate
>
> > config LIB80211_CRYPT_WEP
> > tristate
> >
> > config LIB80211_CRYPT_CCMP
> > tristate
> >
> > config LIB80211_CRYPT_TKIP
> > tristate
>
> > make menuconfig
> > showed these three crypt options rather very prominently,
>
> Well, then your 'make menuconfig' is somehow broken - on mainline
> options that have no prompt are not shown, and indeed 'make menuconfig'
> on the current mainline kernel confirms that those options are not
> possible to select manually.

Indeed, I should have managed to mention that this happened using
make kernel_menuconfig
of OpenWrt fame instead.

I now copied my OpenWrt trunk to a separate directory,
make distclean:ed it, removed all .config files that I could see,
then re-did make menuconfig, make kernel_menuconfig,
resulting in the LIB80211_CRYPT_* issue in
Networking support ---> Wireless to remain problematic as before.

Can someone else confirm and/or elaborate on this improper visibility problem
which seems to be specific to OpenWrt's kernel configuration management?
(which does do certain config things in a rather custom way, I might add)

Thanks,

Andreas Mohr

2014-01-09 22:34:43

by Andreas Mohr

[permalink] [raw]
Subject: Re: OpenWrt kernel_menuconfig issue?

On Tue, Jan 07, 2014 at 10:27:40AM +0100, Nicolas Cavallari wrote:
> On 06/01/2014 20:18, Andreas Mohr wrote:
> > Can someone else confirm and/or elaborate on this improper visibility problem
> > which seems to be specific to OpenWrt's kernel configuration management?
> > (which does do certain config things in a rather custom way, I might add)
>
> This patch explains it all:
>
> https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/255-lib80211_kconfig_hacks.patch

Oh darn it, I completely missed that small change, via that OpenWrt addition!
So in short OpenWrt did modify Kconfig to have a prompt,
yet forgot to then also add the then-necessary dependency information:

[[ Johannes Berg originally replied:
| Well, then your 'make menuconfig' is somehow broken - on mainline
| options that have no prompt are not shown, and indeed 'make menuconfig'
| on the current mainline kernel confirms that those options are not
| possible to select manually.
]]

I'll try to send a repair patch (add dependency)
for these various OpenWrt kernel patch files soon,
unless this is not the way to go...

Thank you very much for your input,

Andreas Mohr

2014-01-07 09:27:53

by Nicolas Cavallari

[permalink] [raw]
Subject: Re: OpenWrt kernel_menuconfig issue?

On 06/01/2014 20:18, Andreas Mohr wrote:
> Can someone else confirm and/or elaborate on this improper visibility problem
> which seems to be specific to OpenWrt's kernel configuration management?
> (which does do certain config things in a rather custom way, I might add)

This patch explains it all:

https://dev.openwrt.org/browser/trunk/target/linux/generic/patches-3.12/255-lib80211_kconfig_hacks.patch

2014-01-06 14:09:30

by Johannes Berg

[permalink] [raw]
Subject: Re: BUG: build fail due to dependency issue (LIB80211_CRYPT_* failed to depend on LIB80211)

On Mon, 2014-01-06 at 15:01 +0100, Andreas Mohr wrote:

> config LIB80211
> tristate

> config LIB80211_CRYPT_WEP
> tristate
>
> config LIB80211_CRYPT_CCMP
> tristate
>
> config LIB80211_CRYPT_TKIP
> tristate

> make menuconfig
> showed these three crypt options rather very prominently,

Well, then your 'make menuconfig' is somehow broken - on mainline
options that have no prompt are not shown, and indeed 'make menuconfig'
on the current mainline kernel confirms that those options are not
possible to select manually.

johannes