Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23111 - usbutils fails to compile with kernel 2.5.70
Summary: usbutils fails to compile with kernel 2.5.70
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-19 08:52 UTC by Matze Braun
Modified: 2004-10-10 06:53 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for header fallback (usbutils.diff,1.62 KB, patch)
2003-10-24 14:06 UTC, Chuck Brewer
Details | Diff
askwar's kernel .config file (config-2.6.7-ck5,27.70 KB, text/plain)
2004-07-18 03:38 UTC, Alexander Skwar
Details
askwar's "emerge info" output (emerge.info,1.94 KB, text/plain)
2004-07-18 03:39 UTC, Alexander Skwar
Details
askwar's installed packages: "epm -qa" output (epm-qa,6.84 KB, text/plain)
2004-07-18 03:39 UTC, Alexander Skwar
Details
askwar's output of "emerge -vd usbutils" (emerge.usbutils.23111,30.32 KB, text/plain)
2004-07-18 03:41 UTC, Alexander Skwar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matze Braun 2003-06-19 08:52:27 UTC
Trying to compile the usbutils-0.11-r1 ebuild with ernel 2.5.70 sources fails:

...
make[1]: Entering directory `/var/tmp/portage/usbutils-0.11-r1/work/usbutils-0.11'
Making all in libusb
make[2]: Entering directory
`/var/tmp/portage/usbutils-0.11-r1/work/usbutils-0.11/libusb'

...

gcc -DHAVE_CONFIG_H -I. -I. -I. -march=pentium4 -O3 -pipe -c  -fPIC -DPIC
access.c -o .libs/access.lo
In file included from /usr/include/linux/usb.h:4,
                 from access.c:34:
/usr/include/linux/mod_devicetable.h:18: parse error before "__u32"
/usr/include/linux/mod_devicetable.h:20: parse error before "class"
/usr/include/linux/mod_devicetable.h:21: parse error before "driver_data"
/usr/include/linux/mod_devicetable.h:31: parse error before "__u32"
/usr/include/linux/mod_devicetable.h:33: parse error before "model_id"
/usr/include/linux/mod_devicetable.h:34: parse error before "specifier_id"
/usr/include/linux/mod_devicetable.h:35: parse error before "version"
/usr/include/linux/mod_devicetable.h:36: parse error before "driver_data"
/usr/include/linux/mod_devicetable.h:99: parse error before "__u16"
/usr/include/linux/mod_devicetable.h:103: parse error before "idProduct"
/usr/include/linux/mod_devicetable.h:104: parse error before "bcdDevice_lo"
/usr/include/linux/mod_devicetable.h:105: parse error before "bcdDevice_hi"
/usr/include/linux/mod_devicetable.h:108: parse error before "bDeviceClass"
/usr/include/linux/mod_devicetable.h:109: parse error before "bDeviceSubClass"
/usr/include/linux/mod_devicetable.h:110: parse error before "bDeviceProtocol"
/usr/include/linux/mod_devicetable.h:113: parse error before "bInterfaceClass"
/usr/include/linux/mod_devicetable.h:114: parse error before "bInterfaceSubClass"
/usr/include/linux/mod_devicetable.h:115: parse error before "bInterfaceProtocol"
/usr/include/linux/mod_devicetable.h:118: parse error before "driver_info"
/usr/include/linux/mod_devicetable.h:135: parse error before "__u16"
/usr/include/linux/mod_devicetable.h:138: parse error before "dev_type"
/usr/include/linux/mod_devicetable.h:139: parse error before "cu_model"
/usr/include/linux/mod_devicetable.h:140: parse error before "dev_model"
/usr/include/linux/mod_devicetable.h:142: parse error before "driver_info"
make[2]: *** [access.lo] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
In file included from /usr/include/linux/usb.h:4,
                 from descparse.c:34:
/usr/include/linux/mod_devicetable.h:18: parse error before "__u32"
/usr/include/linux/mod_devicetable.h:20: parse error before "class"
/usr/include/linux/mod_devicetable.h:21: parse error before "driver_data"
/usr/include/linux/mod_devicetable.h:31: parse error before "__u32"
/usr/include/linux/mod_devicetable.h:33: parse error before "model_id"
/usr/include/linux/mod_devicetable.h:34: parse error before "specifier_id"
/usr/include/linux/mod_devicetable.h:35: parse error before "version"
/usr/include/linux/mod_devicetable.h:36: parse error before "driver_data"
/usr/include/linux/mod_devicetable.h:99: parse error before "__u16"
/usr/include/linux/mod_devicetable.h:103: parse error before "idProduct"
/usr/include/linux/mod_devicetable.h:104: parse error before "bcdDevice_lo"
/usr/include/linux/mod_devicetable.h:105: parse error before "bcdDevice_hi"
/usr/include/linux/mod_devicetable.h:108: parse error before "bDeviceClass"
/usr/include/linux/mod_devicetable.h:109: parse error before "bDeviceSubClass"
/usr/include/linux/mod_devicetable.h:110: parse error before "bDeviceProtocol"
/usr/include/linux/mod_devicetable.h:113: parse error before "bInterfaceClass"
/usr/include/linux/mod_devicetable.h:114: parse error before "bInterfaceSubClass"
/usr/include/linux/mod_devicetable.h:115: parse error before "bInterfaceProtocol"
/usr/include/linux/mod_devicetable.h:118: parse error before "driver_info"
/usr/include/linux/mod_devicetable.h:135: parse error before "__u16"
/usr/include/linux/mod_devicetable.h:138: parse error before "dev_type"
/usr/include/linux/mod_devicetable.h:139: parse error before "cu_model"
/usr/include/linux/mod_devicetable.h:140: parse error before "dev_model"
/usr/include/linux/mod_devicetable.h:142: parse error before "driver_info"
make[2]: *** [descparse.lo] Fehler 1
make[2]: Leaving directory
`/var/tmp/portage/usbutils-0.11-r1/work/usbutils-0.11/libusb'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/usbutils-0.11-r1/work/usbutils-0.11'
make: *** [all-recursive-am] Fehler 2



Reproducible: Always
Steps to Reproduce:
1. emerge usbutils with kernel 2.5.70 installed
Comment 1 Tim Yamin (RETIRED) gentoo-dev 2003-08-29 03:34:41 UTC
Can you please remerge your linux-headers and try again?
Comment 2 Brian Jackson (RETIRED) gentoo-dev 2003-09-24 00:48:12 UTC
can you test this for us please
Comment 3 Chuck Brewer 2003-10-24 14:05:20 UTC
I get the same errors listed below against 2.6 headers. Since trying out
udev,
hotplug has been added as a depend of udev, and hotplug is calling for
usbutils.
1) Is usbutils really neccessary for hotplug?
2) Is there any work being done here or upstream to make it 2.6 compatible?
3) If not, I had tried to rip the checks out of the configure script to not
check for linux/usb.h, but hadn't had any success (configure confuses me
most
times) so I ripped the #ifndefs out of the code making it fall back to the
included 2.4.21 header automatically. Will attach patch. Am open to alternate
solutions. (besides header regression:) )
Comment 4 Chuck Brewer 2003-10-24 14:06:37 UTC
Created attachment 19742 [details, diff]
patch for header fallback
Comment 5 Jyrki Muukkonen 2003-11-25 06:31:41 UTC
I'm using 2.6.0-test10 kernel and headers. The patch seems to do the trick... kernel headers should _not_ be included in userspace. Including this patch in ebuild is a bit complicated though because Gentoo doesn't really support 2.6 headers yet. Any idea if this patch works with 2.4 headers?
Comment 6 Chuck Brewer 2003-11-25 21:49:11 UTC
The thing is, the package comes with it's own headers to fall back onto if one
isn't found in /usr/include. All the patch does is rip out the check
into /usr/include, making it compile with its own self-contained
headers. Works with 2.4,2.5,2.6....simply because it doesn't need the external
headers with this patch:)
Comment 7 Alexander Skwar 2004-07-18 03:37:52 UTC
This still happens with linux26-headers-2.6.7-r3 and sys-apps/usbutils-0.11-r3.

I'm getting the exact same error message Matze reported. Requesting to have this bug reopened.
Comment 8 Alexander Skwar 2004-07-18 03:38:29 UTC
Created attachment 35677 [details]
askwar's kernel .config file
Comment 9 Alexander Skwar 2004-07-18 03:39:00 UTC
Created attachment 35678 [details]
askwar's "emerge info" output
Comment 10 Alexander Skwar 2004-07-18 03:39:34 UTC
Created attachment 35679 [details]
askwar's installed packages: "epm -qa" output
Comment 11 Alexander Skwar 2004-07-18 03:41:38 UTC
Created attachment 35680 [details]
askwar's output of "emerge -vd usbutils"
Comment 12 Tim Yamin (RETIRED) gentoo-dev 2004-07-18 03:42:47 UTC
Works fine here with 2.6.7-r3 headers. But I'm using gcc-3.3.3...
Comment 13 Hans de Graaff gentoo-dev Security 2004-10-10 00:48:08 UTC
I have the same problem with both the kernel.org 2.6.8 sources and with gentoo-dev-sources-2.6.8-r7 in combination with usbutils-0.11-r5 (but I had problems with earlier version of the kernel and usbutils as well).

The problem is that the additional includes needed to define all the types in mod_devicetable.h are protected behind a #ifdef __KERNEL__. Adding this to access.c solves this problem. 

However, this leads to additional problems with asm/irq_vectors.h not being found. This is a machine-dependant IRQ header file. Since I did not want to muck with that I just removed all mention of the local kernel files in access.c and descparse.c, falling back to the included "usb.h". This seems to work fine, so perhaps this should be the default even if local kernel headers are present.
Comment 14 Alexander Skwar 2004-10-10 06:53:20 UTC
I'm now able to emerge sys-apps/usbutils-0.11-r5 with sys-kernel/ck-sources-2.6.8.1-r9