Bug 9187 - ir-functions.c:(.text+0xbce18): undefined reference to `input_event'
Summary: ir-functions.c:(.text+0xbce18): undefined reference to `input_event'
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Input Devices (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: drivers_input-devices
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-18 20:52 UTC by Avuton Olrich
Modified: 2008-09-26 07:23 UTC (History)
3 users (show)

See Also:
Kernel Version: v2.6.23
Subsystem:
Regression: ---
Bisected commit-id:


Attachments
ir-functions.c-undef-refereence.config (30.10 KB, text/plain)
2007-10-18 20:55 UTC, Avuton Olrich
Details
One patch/solution to the link errors. (4.57 KB, patch)
2007-10-18 23:01 UTC, Randy Dunlap
Details | Diff

Description Avuton Olrich 2007-10-18 20:52:40 UTC
I was running randconfig and found the following problem. Config attached:

drivers/built-in.o: In function `ir_input_key_event':
ir-functions.c:(.text+0xbce18): undefined reference to `input_event'
ir-functions.c:(.text+0xbce26): undefined reference to `input_event'
drivers/built-in.o: In function `ir_detach':
ir-kbd-i2c.c:(.text+0xc4fc9): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `ir_probe':
ir-kbd-i2c.c:(.text+0xc5317): undefined reference to `input_allocate_device'
ir-kbd-i2c.c:(.text+0xc5394): undefined reference to `input_free_device'
ir-kbd-i2c.c:(.text+0xc5486): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_fini':
(.text+0xdc646): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0xdcb3a): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0xdcc79): undefined reference to `input_register_device'
drivers/built-in.o: In function `saa7134_input_init1':
(.text+0xdcc9f): undefined reference to `input_free_device'
drivers/built-in.o: In function `cx88_ir_fini':
(.text+0xe10ed): undefined reference to `input_unregister_device'
drivers/built-in.o: In function `cx88_ir_init':
(.text+0xe1184): undefined reference to `input_allocate_device'
drivers/built-in.o: In function `cx88_ir_init':
(.text+0xe11b4): undefined reference to `input_free_device'
drivers/built-in.o: In function `cx88_ir_init':
(.text+0xe1318): undefined reference to `input_register_device'
Comment 1 Avuton Olrich 2007-10-18 20:55:21 UTC
Created attachment 13206 [details]
ir-functions.c-undef-refereence.config
Comment 2 Avuton Olrich 2007-10-18 20:56:19 UTC
This also occurs upto today's linus' git master: 4fa4d23fa20de67df919030c1216295664866ad7
Comment 3 Randy Dunlap 2007-10-18 21:54:03 UTC
[bugme-daemon@bugzilla.kernel.org wrote:]



From: Randy Dunlap <randy.dunlap@oracle.com>

Drivers that use lro functions should depend on INET, otherwise they
may not link correctly.  Let's not select INET.  Select should be used
only for library-like code, not to enable subsystems.

ERROR: "lro_flush_all" [drivers/net/myri10ge/myri10ge.ko] undefined!
ERROR: "lro_receive_frags" [drivers/net/myri10ge/myri10ge.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 drivers/net/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- linux-2.6.23-git13.orig/drivers/net/Kconfig
+++ linux-2.6.23-git13/drivers/net/Kconfig
@@ -2494,7 +2494,7 @@ config CHELSIO_T3
 
 config EHEA
 	tristate "eHEA Ethernet support"
-	depends on IBMEBUS
+	depends on IBMEBUS && INET
 	select INET_LRO
 	---help---
 	  This driver supports the IBM pSeries eHEA ethernet adapter.
@@ -2591,7 +2591,7 @@ config S2IO_NAPI
 
 config MYRI10GE
 	tristate "Myricom Myri-10G Ethernet support"
-	depends on PCI
+	depends on PCI && INET
 	select FW_LOADER
 	select CRC32
 	select INET_LRO
Comment 4 David S. Miller 2007-10-18 22:02:38 UTC
From: Randy Dunlap <randy.dunlap@oracle.com>
Date: Thu, 18 Oct 2007 21:53:50 -0700

> [bugme-daemon@bugzilla.kernel.org wrote:]
> 
> 
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Drivers that use lro functions should depend on INET, otherwise they
> may not link correctly.  Let's not select INET.  Select should be used
> only for library-like code, not to enable subsystems.
> 
> ERROR: "lro_flush_all" [drivers/net/myri10ge/myri10ge.ko] undefined!
> ERROR: "lro_receive_frags" [drivers/net/myri10ge/myri10ge.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Acked-by: David S. Miller <davem@davemloft.net>

Jeff, please pick this one up too, thanks!
Comment 5 Randy Dunlap 2007-10-18 22:54:53 UTC
Crap, that patch is for bugzilla #9186.  Sorry about that.
Patch for this one follows soon.
Comment 6 Randy Dunlap 2007-10-18 23:01:01 UTC
Created attachment 13211 [details]
One patch/solution to the link errors.

This is one possible solution, using "depends on".  Some people may prefer
to use "select" instead, but I had rather avoid that when possible.
Comment 7 Jean Delvare 2007-10-19 00:28:41 UTC
This bug doesn't have anything to do with I2C, changing component to Input Devices.
Comment 8 Anonymous Emailer 2007-10-19 20:04:05 UTC
Reply-To: jeff@garzik.org

Randy Dunlap wrote:
> [bugme-daemon@bugzilla.kernel.org wrote:]
> 
> 
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Drivers that use lro functions should depend on INET, otherwise they
> may not link correctly.  Let's not select INET.  Select should be used
> only for library-like code, not to enable subsystems.
> 
> ERROR: "lro_flush_all" [drivers/net/myri10ge/myri10ge.ko] undefined!
> ERROR: "lro_receive_frags" [drivers/net/myri10ge/myri10ge.ko] undefined!
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

applied
Comment 9 Dmitry Torokhov 2007-10-23 06:39:53 UTC
Mauro should porobably take the patch to drivers/media/* through his tree.
Comment 10 Roland Kletzing 2008-05-17 02:37:54 UTC
i see these fixes in mainline - so can`t this be closed ?

Note You need to log in before you can comment on or make changes to this bug.