After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 321939 - GARNOME 2.12.1 fails on HAL for HID_MAX_USAGES undeclared
GARNOME 2.12.1 fails on HAL for HID_MAX_USAGES undeclared
Status: RESOLVED NOTGNOME
Product: GARNOME
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GARNOME Maintainers
garnome list
Depends on:
Blocks:
 
 
Reported: 2005-11-20 15:44 UTC by Bob Hutzel
Modified: 2006-03-16 02:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bob Hutzel 2005-11-20 15:44:11 UTC
Distribution/Version: Slackware 10.2

Steps to consistently produce:
1) make paranoid-install

When building garnome 2.12.1 on a Slackware 10.2 system running a custom built
Linux 2.6.12.5 kernel, hal-0.5.4 configuration crashes with the following:

if cc -DHAVE_CONFIG_H -I. -I. -I../../..
-DPACKAGE_SYSCONF_DIR=\""/root/garnome/etc"\"
-DPACKAGE_DATA_DIR=\""/root/garnome/share"\"
-DPACKAGE_BIN_DIR=\""/root/garnome/bin"\"
-DPACKAGE_LOCALE_DIR=\""/root/garnome/share/locale"\"
-DPACKAGE_LOCALSTATEDIR=\""/root/garnome/var"\" -I../../..
-I/root/garnome/include/glib-2.0 -I/root/garnome/lib/glib-2.0/include
-I/root/garnome/include/dbus-1.0 -I/root/garnome/lib/dbus-1.0/include   
-I/root/garnome/include  -I/root/garnome/include -L/root/garnome/lib -O2 -pipe
-Wall -Wchar-subscripts -Wmissing-declarations -Wnested-externs -Wpointer-arith
-Wcast-align -Wsign-compare -MT probe-hiddev.o -MD -MP -MF
".deps/probe-hiddev.Tpo" -c -o probe-hiddev.o probe-hiddev.c; \
then mv -f ".deps/probe-hiddev.Tpo" ".deps/probe-hiddev.Po"; else rm -f
".deps/probe-hiddev.Tpo"; exit 1; fi
In file included from probe-hiddev.c:40:
/usr/include/linux/hiddev.h:134: error: `HID_MAX_USAGES' undeclared here (not in
a function)
make[6]: *** [probe-hiddev.o] Error 1
make[6]: Leaving directory
`/home/bob/Downloads/garnome-2.12.1/freedesktop/hal/work/main.d/hal-0.5.4/hald/linux2/probing'

I already have the hal-slackware-kernel-includes.diff being patched to fix the
BLKGETSIZE64 issue.

/usr# find . -name "hiddev.h"
./src/linux-2.6.12.5/include/linux/hiddev.h
./src/linux-2.6.12.5/include/config/usb/hiddev.h
./include/linux/hiddev.h

I have src/linux linked to src/linux-2.6.12.5

In my kernel's config file the only HID related
constants I could find are:

#
# USB Input Devices
#
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
# CONFIG_HID_FF is not set
CONFIG_USB_HIDDEV=y
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_MTOUCH is not set
# CONFIG_USB_EGALAX is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set


Contents of /usr/src/linux/include/config/usb/hiddev.h:
#define CONFIG_USB_HIDDEV 1


Header of /usr/include/linux/hiddev.h:

/*
 * $Id: hiddev.h,v 1.2 2001/04/26 11:26:09 vojtech Exp $
 *
 *  Copyright (c) 1999-2000 Vojtech Pavlik
 *
 *  Sponsored by SuSE
 */

On line 129, begins the only mention of HID_MAX_USAGES:

/* hiddev_usage_ref_multi is used for sending multiple bytes to a control.
 * It really manifests itself as setting the value of consecutive usages */
struct hiddev_usage_ref_multi {
        struct hiddev_usage_ref uref;
        __u32 num_values;
        __s32 values[HID_MAX_USAGES];
};

This is all of the information I could think to gather. If anything further
would help, just let me know.
Comment 1 Bob Kashani 2005-11-25 04:42:28 UTC
Here is what I get when I grep my .config file:

[medieval@chaucer 2.6.14-1.1637_FC4-i686]$ grep HID .config
CONFIG_BT_HIDP=m
CONFIG_USB_HID=y
CONFIG_USB_HIDINPUT=y
CONFIG_HID_FF=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
CONFIG_USB_PHIDGETKIT=m
CONFIG_USB_PHIDGETSERVO=m

Basically it's similar to yours.

Also my header files seem to be newer than yours, specifically my
/usr/include/linux/hiddev.h seems to be totally different. You could try copying
the header files from your kernel src tree into /usr/include (which should help).

Realistically, this is yet-another-broken-slackware-header and you should file a
bug against Slackware.
Comment 2 Bastiaan Wakkie 2005-12-22 08:36:41 UTC
Have the same problem in Mandrake 10.1.

I also found a comment in the linux-kernel archive that relates to the same problem of an undefined HID_MAX_USAGES: http://www.ussg.iu.edu/hypermail/linux/kernel/0403.2/0619.html

So it is declared in a different file: hid.h

But for now in order to continue I just the following line in the hiddev.h file:
/* hiddev_usage_ref_multi is used for sending multiple bytes to a control.
 * It really manifests itself as setting the value of consecutive usages */
                                                                                
#define HID_MAX_USAGES 1024 /* completely bogus... but a fix for me */
                                                                                
struct hiddev_usage_ref_multi {
        struct hiddev_usage_ref uref;
        __u32 num_values;
        __s32 values[HID_MAX_USAGES];
};

Comment 3 Randy "DontKnow" A. 2006-01-09 16:56:04 UTC
I have an older slackware, but slackware's installation of /usr/include/linux and other directories is disturbing, though useful if you never upgrade your kernel and therefore never install kernel source.

So, when you upgrade your kernel, you need to do something like the following:

su -
cd /usr/include
mv linux linux.old
mv asm asm.old
mv asm-generic asm-generic.old
mv asm-i386 asm-i386.old
ln -s /usr/src/linux/include/linux/ .
ln -s asm-i386 asm
ln -s /usr/src/linux/include/asm-generic/ .
ln -s /usr/src/linux/include/asm-i386/ .

--Randy "DontKnow" A.