New: It's not possible to compile kernel if CONFIG_NETCONSOLE_DYNAMIC is turned on
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]/
(switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface).
Quoted 54 lines · On Mon, 20 Jun 2011 19:09:49 GMT [email protected] wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=37992
Summary: It's not possible to compile kernel if
CONFIG_NETCONSOLE_DYNAMICis turned on
Product: Drivers
Version: 2.5
Kernel Version: 3.0-rc3+
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: high
Priority: P1
Component: Network
AssignedTo: [email protected]
ReportedBy: [email protected]
Regression: NoHello guys,
It's not possible to compile kernel if
CONFIG_NETCONSOLE_DYNAMICis turned
on ...
drivers/built-in.o: In function `netconsole_target_put':/usr/src/linux-3.0/drivers/net/netconsole.c:133: undefined reference to `config_item_put'drivers/built-in.o: In function `netconsole_target_get':/usr/src/linux-3.0/drivers/net/netconsole.c:127: undefined reference to `config_item_get'drivers/built-in.o: In function `netconsole_target_put':/usr/src/linux-3.0/drivers/net/netconsole.c:133: undefined reference to `config_item_put'drivers/built-in.o: In function `netconsole_target_get':/usr/src/linux-3.0/drivers/net/netconsole.c:127: undefined reference to `config_item_get'drivers/built-in.o: In function `netconsole_target_put':/usr/src/linux-3.0/drivers/net/netconsole.c:133: undefined reference to `config_item_put'drivers/built-in.o: In function `drop_netconsole_target':/usr/src/linux-3.0/drivers/net/netconsole.c:588: undefined reference to `config_item_put'drivers/built-in.o: In function `make_netconsole_target':/usr/src/linux-3.0/drivers/net/netconsole.c:561: undefined reference to `config_item_init_type_name'drivers/built-in.o: In function `dynamic_netconsole_init':/usr/src/linux-3.0/drivers/net/netconsole.c:109: undefined reference toconfig_group_init' /usr/src/linux-3.0/drivers/net/netconsole.c:111: undefined reference toconfigfs_register_subsystem'drivers/built-in.o: In function `dynamic_netconsole_exit':/usr/src/linux-3.0/drivers/net/netconsole.c:116: undefined reference to `configfs_unregister_subsystem'
make: *** [.tmp_vmlinux1] Error 1
PATCH 1/1 netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference to config_item_put' drivers/built-in.o: In function make_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference to config_item_init_type_name' drivers/built-in.o: In function write_msg':
netconsole.c:(.text+0x1a11a4): undefined reference to config_item_get' netconsole.c:(.text+0x1a1211): undefined reference to config_item_put' drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference to config_item_put' netconsole.c:(.text+0x1a12ec): undefined reference to config_item_get' netconsole.c:(.text+0x1a1366): undefined reference to config_item_put' drivers/built-in.o: In function init_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference to config_group_init' netconsole.c:(.init.text+0x9560): undefined reference to configfs_register_subsystem' drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'
so make NETCONSOLE_DYNAMIC require CONFIGFS_FS=y to fix the build errors.
This is one possible fix.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992
--- drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/Kconfig +1 -1
@@ -3416,7 +3416,7 @@ config NETCONSOLE config NETCONSOLE_DYNAMIC bool "Dynamic reconfiguration of logging targets" - depends on NETCONSOLE && SYSFS && CONFIGFS_FS + depends on NETCONSOLE && SYSFS && CONFIGFS_FS=y help This option enables the ability to dynamically reconfigure target parameters (interface, IP addresses, port numbers, MAC addresses)
Re: [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
Quoted 22 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference toconfig_item_put' drivers/built-in.o: In functionmake_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference toconfig_item_init_type_name' drivers/built-in.o: In functionwrite_msg':
netconsole.c:(.text+0x1a11a4): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1211): undefined reference toconfig_item_put'drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference toconfig_item_put' netconsole.c:(.text+0x1a12ec): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1366): undefined reference toconfig_item_put' drivers/built-in.o: In functioninit_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference toconfig_group_init' netconsole.c:(.init.text+0x9560): undefined reference toconfigfs_register_subsystem'drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'
Quoted 1 line
so make
NETCONSOLE_DYNAMICrequire CONFIGFS_FS=y to fix the build errors.
[...]
NETCONSOLE is tristate, and I think NETCONSOLE=m && NETCONSOLE_DYNAMIC=y && CONFIGFS_FS=m should be OK.
It seems like Kconfig should have a '>=' operator which behaves like a numeric comparison with n=0, m=1, y=2. Then we could use a dependency of:
NETCONSOLE && SYSFS && CONFIGFS_FS>=NETCONSOLE
But for now I think the correct dependency is:
NETCONSOLE && SYSFS && CONFIGFS_FS && !(NETCONSOLE=y && CONFIGFS_FS=m)
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
Re: [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
Quoted 29 lines · Ben Hutchings
Quoted 22 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference toconfig_item_put' drivers/built-in.o: In functionmake_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference toconfig_item_init_type_name' drivers/built-in.o: In functionwrite_msg':
netconsole.c:(.text+0x1a11a4): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1211): undefined reference toconfig_item_put'drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference toconfig_item_put' netconsole.c:(.text+0x1a12ec): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1366): undefined reference toconfig_item_put' drivers/built-in.o: In functioninit_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference toconfig_group_init' netconsole.c:(.init.text+0x9560): undefined reference toconfigfs_register_subsystem'drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'Quoted 1 line
so make
NETCONSOLE_DYNAMICrequire CONFIGFS_FS=y to fix the build errors.[...]
NETCONSOLE is tristate, and I think NETCONSOLE=m && NETCONSOLE_DYNAMIC=y && CONFIGFS_FS=m should be OK.
Quoted 7 lines
It seems like
Kconfigshould have a '>=' operator which behaves like a numeric comparison with n=0, m=1, y=2. Then we could use a dependency of:NETCONSOLE && SYSFS && CONFIGFS_FS>=NETCONSOLEBut for now I think the correct dependency is:
NETCONSOLE && SYSFS && CONFIGFS_FS && !(NETCONSOLE=y && CONFIGFS_FS=m)
or just have NETCONSOLE_DYNAMIC select CONFIGFS_FS instead of depend on it.
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***
PATCH v2 1/1 netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
In reply to Ben HutchingsFrom: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference to config_item_put' drivers/built-in.o: In function make_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference to config_item_init_type_name' drivers/built-in.o: In function write_msg':
netconsole.c:(.text+0x1a11a4): undefined reference to config_item_get' netconsole.c:(.text+0x1a1211): undefined reference to config_item_put' drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference to config_item_put' netconsole.c:(.text+0x1a12ec): undefined reference to config_item_get' netconsole.c:(.text+0x1a1366): undefined reference to config_item_put' drivers/built-in.o: In function init_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference to config_group_init' netconsole.c:(.init.text+0x9560): undefined reference to configfs_register_subsystem' drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'
so fix the NETCONSOLE_DYNAMIC depends clause to prevent this. Based on email suggestion from Ben Hutchings. Thanks.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992
--- drivers/net/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/Kconfig +2 -1
@@ -3416,7 +3416,8 @@ config NETCONSOLE config NETCONSOLE_DYNAMIC bool "Dynamic reconfiguration of logging targets" - depends on NETCONSOLE && SYSFS && CONFIGFS_FS + depends on NETCONSOLE && SYSFS && CONFIGFS_FS && \ + !(NETCONSOLE=y && CONFIGFS_FS=m) help This option enables the ability to dynamically reconfigure target parameters (interface, IP addresses, port numbers, MAC addresses)
Re: [PATCH v2] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
From: Randy Dunlap <[email protected]>
Date: Tue, 21 Jun 2011 11:01:20 -0700
Quoted 22 lines
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference toconfig_item_put' drivers/built-in.o: In functionmake_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference toconfig_item_init_type_name' drivers/built-in.o: In functionwrite_msg':
netconsole.c:(.text+0x1a11a4): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1211): undefined reference toconfig_item_put'drivers/built-in.o: In function `netconsole_netdev_event':
netconsole.c:(.text+0x1a12cc): undefined reference toconfig_item_put' netconsole.c:(.text+0x1a12ec): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1366): undefined reference toconfig_item_put' drivers/built-in.o: In functioninit_netconsole':
netconsole.c:(.init.text+0x953a): undefined reference toconfig_group_init' netconsole.c:(.init.text+0x9560): undefined reference toconfigfs_register_subsystem'drivers/built-in.o: In function `dynamic_netconsole_exit':
netconsole.c:(.exit.text+0x809): undefined reference to `configfs_unregister_subsystem'
Quoted 7 lines
so fix the
NETCONSOLE_DYNAMICdepends clause to prevent this. Based on email suggestion from Ben Hutchings. Thanks.Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992
Reported-by David Hill <[email protected]>Signed-off-by Randy Dunlap <[email protected]>
Applied, thanks Randy.
Re: [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
In reply to Randy DunlapQuoted 42 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference toconfig_item_put' drivers/built-in.o: In functionmake_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference toconfig_item_init_type_name' drivers/built-in.o: In functionwrite_msg': netconsole.c:(.text+0x1a11a4): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1211): undefined reference toconfig_item_put'drivers/built-in.o: In functionnetconsole_netdev_event': netconsole.c:(.text+0x1a12cc): undefined reference toconfig_item_put' netconsole.c:(.text+0x1a12ec): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1366): undefined reference toconfig_item_put'drivers/built-in.o: In functioninit_netconsole': netconsole.c:(.init.text+0x953a): undefined reference toconfig_group_init' netconsole.c:(.init.text+0x9560): undefined reference toconfigfs_register_subsystem' drivers/built-in.o: In functiondynamic_netconsole_exit': netconsole.c:(.exit.text+0x809):
undefined reference to `configfs_unregister_subsystem'so make
NETCONSOLE_DYNAMICrequire CONFIGFS_FS=y to fix the build errors.This is one possible fix.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992Dunlap <[email protected]> ---
drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)--- lnx-30-rc3.orig/drivers/net/Kconfig +++
lnx-30-rc3/drivers/net/Kconfigdrivers/net/Kconfig +1
-1@@ -3416,7 +3416,7 @@ config NETCONSOLE config NETCONSOLE_DYNAMIC bool "Dynamic reconfiguration of logging targets" - depends on NETCONSOLE && SYSFS && CONFIGFS_FS + depends on NETCONSOLE
Quoted 1 line
&& SYSFS && CONFIGFS_FS=y
I recall someone already fixed this by adding "select CONFIGFS_FS", who removed it again... :-/
Re: [PATCH] netconsole: fix build when CONFIG_NETCONSOLE_DYNAMIC is turned on
Quoted 40 lines · On Tue, 21 Jun 2011 12:50:14 +0000 (UTC) WANG Cong wrote:
Quoted 38 lines · Randy Dunlap
From: Randy Dunlap <[email protected]>
When NETCONSOLE_DYNAMIC=y and CONFIGFS_FS=m, there are build errors in netconsole:
drivers/built-in.o: In function `drop_netconsole_target':
netconsole.c:(.text+0x1a100f): undefined reference toconfig_item_put' drivers/built-in.o: In functionmake_netconsole_target':
netconsole.c:(.text+0x1a10b9): undefined reference toconfig_item_init_type_name' drivers/built-in.o: In functionwrite_msg': netconsole.c:(.text+0x1a11a4): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1211): undefined reference toconfig_item_put'drivers/built-in.o: In functionnetconsole_netdev_event': netconsole.c:(.text+0x1a12cc): undefined reference toconfig_item_put' netconsole.c:(.text+0x1a12ec): undefined reference toconfig_item_get' netconsole.c:(.text+0x1a1366): undefined reference toconfig_item_put'drivers/built-in.o: In functioninit_netconsole': netconsole.c:(.init.text+0x953a): undefined reference toconfig_group_init' netconsole.c:(.init.text+0x9560): undefined reference toconfigfs_register_subsystem' drivers/built-in.o: In functiondynamic_netconsole_exit': netconsole.c:(.exit.text+0x809):
undefined reference to `configfs_unregister_subsystem'so make
NETCONSOLE_DYNAMICrequire CONFIGFS_FS=y to fix the build errors.This is one possible fix.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=37992Dunlap <[email protected]> ---
drivers/net/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)--- lnx-30-rc3.orig/drivers/net/Kconfig +++
lnx-30-rc3/drivers/net/Kconfig(quoted diff) +0
-0@@ -3416,7 +3416,7 @@ config NETCONSOLE
Quoted 8 lines
Quoted 5 lines
drivers/net/Kconfig +1
-1config NETCONSOLE_DYNAMIC bool "Dynamic reconfiguration of logging targets" - depends on NETCONSOLE && SYSFS && CONFIGFS_FS + depends on NETCONSOLE&& SYSFS && CONFIGFS_FS=y
I recall someone already fixed this by adding "select
CONFIGFS_FS", who removed it again... :-/
Hi,
Thanks for the reminder. I'll try Ben Hutchings' suggestion.
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***