Bug 3945 - kernel compile crashes at drivers/usb/usbdrv.o
kernel compile crashes at drivers/usb/usbdrv.o
Status: REJECTED INVALID
Product: Drivers
Classification: Unclassified
Component: USB
i386 Linux
: P2 normal
Assigned To: Greg Kroah-Hartman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2004-12-23 13:56 UTC by Michael Elbaum
Modified: 2005-02-17 09:03 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.4.22 through 2.4.28
Tree: Mainline
Regression: ---


Attachments

Description Michael Elbaum 2004-12-23 13:56:56 UTC
Distribution: Gentoo (both gentoo sources and vanilla sources)
Hardware Environment: IBM Thinkpad T42
Software Environment: Gentoo Linux in 2.6.8 kernel
Problem Description: 

Compiling a 2.4 kernel (make dep && make bzImage) crashes with errors in the USB
drivers:

drivers/usb/usbdrv.o(.text+0x135e5): In function `hidinput_hid_event':
: undefined reference to `input_event'
drivers/usb/usbdrv.o(.text+0x1365b): In function `hidinput_hid_event':
: undefined reference to `input_event'
drivers/usb/usbdrv.o(.text+0x136cf): In function `hidinput_hid_event':
: undefined reference to `input_event'
drivers/usb/usbdrv.o(.text+0x1371b): In function `hidinput_hid_event':
: undefined reference to `input_event'
drivers/usb/usbdrv.o(.text+0x138bc): In function `hidinput_connect':
: undefined reference to `input_register_device'
drivers/usb/usbdrv.o(.text+0x13909): In function `hidinput_connect':
: undefined reference to `input_register_device'
drivers/usb/usbdrv.o(.text+0x13a57): In function `hidinput_disconnect':
: undefined reference to `input_unregister_device'
drivers/usb/usbdrv.o(.text+0x13611): In function `hidinput_hid_event':
: undefined reference to `input_event'
make: *** [vmlinux] Error 1


I reported this to Gentoo as bug #66070, reproduced in 2.4.22 through 2.4.26.
They suggested trying vanilla sources, and I get the same crash for 2.4.26 and
2.4.28. 

kernel 2.4.20-gentoo compiles fine.

I can send my .config to whoever's interested. (You can also pull them from the
Gentoo bug site.)


Steps to reproduce:

make dep && make bzImage
Comment 1 Domen Puncer 2004-12-24 17:46:42 UTC
Problem is that you have CONFIG_INPUT as module and CONFIG_USB_HID built-in.

"Fix": change "input" from module to built-in (compiles for me here) or "usb
hid" to module.


Real fix:
I did some investigation, but have no idea how to fix this dependency (other
than adding a comment)

I'll try to explain the problem:
CONFIG_INPUT        <M> Input core support
CONFIG_USB_HID      <*>   USB Human Interface Device (full HID) support     
CONFIG_USB_HIDINPUT [*]     HID input layer support

USB_HIDINPUT is dependent on INPUT and USB_HID, but it is not a new module, it
builds into USB_HID (module or built-in)

So... you can't select USB_HIDINPUT as INPUT was, making USB_HID depend on INPUT
looks wrong; maybe something like 2.6's "select" is the solution?
Comment 2 Michael Elbaum 2004-12-25 08:44:31 UTC
Thanks!! It compiles now. I think I got into the mess because menuconfig puts
the Input Core and USB devices on different (and distant) pages. Usually
conflicts like this cause the following lines to disappear, so I didn't think to
go back and check my earlier choices carefully enough. Maybe just locking
CONFIG_USB_HID to whatever was chosen for CONFIG_INPUT, with a comment, would be
enough.
Comment 3 Greg Kroah-Hartman 2005-02-17 09:03:14 UTC
This database is not for 2.4 bugs, sorry.

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