[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#220814: #define rate period patch broken for 2.4 kernels (was: Re: Bug#220814: X 4.3 FTBFS on hppa)



# + sarge?
tags 220814 + fixed-in-experimental
thanks mate

On Fri, Nov 14, 2003 at 07:54:58PM +0000, Matthew Wilcox wrote:
> Branden, I initially thought this was an hppa problem.  It's not, it's
> a kernel-headers problem.  I suspect it will also affect unstable,
> but I'm not sure.
> 
> lnx_io.c: In function `KDKBDREP_ioctl_ok':
> lnx_io.c:90: error: structure has no member named `rate'
> lnx_io.c:98: error: structure has no member named `rate'
> lnx_io.c:100: error: structure has no member named `rate'
> lnx_io.c:101: error: structure has no member named `rate'
> lnx_io.c:102: error: structure has no member named `rate'
> make[8]: *** [lnx_io.o] Error 1
> make[8]: Leaving directory `/home/willy/xfree86/xfree86-4.3.0/build-tree/xc/programs/Xserver/hw/xfree86/os-support/linux'
> 
> line 90 is:    kbdrep_s.rate = -1;
> which is:    struct kbd_repeat kbdrep_s;
> which comes from /usr/include/linux/kd.h,
> which has the rather helpful comment:
> 
> struct kbd_repeat {
>         int delay;      /* in msec; <= 0: don't change */
>         int period;     /* in msec; <= 0: don't change */
>                         /* earlier this field was misnamed "rate" */
> };
> 
> Shazam.  It's not hppa, it's the wonderful new linux-kernel-headers
> package.  Which come from 2.6 ... where Andries Brouwer commited this
> patch 14 months ago:
> 
> --- 1.3/include/linux/kd.h	Sun May  5 21:11:34 2002
> +++ 1.4/include/linux/kd.h	Fri Oct 11 03:02:14 2002
> @@ -134,7 +134,8 @@
>  
>  struct kbd_repeat {
>  	int delay;	/* in msec; <= 0: don't change */
> -	int rate;	/* in msec; <= 0: don't change */
> +	int period;	/* in msec; <= 0: don't change */
> +			/* earlier this field was misnamed "rate" */
>  };
>  
>  #define KDKBDREP        0x4B52  /* set keyboard delay/repeat rate;
> 
> Andries, care to explain why you broke XFree86?

Matt, we've added patches for this to both trunk and branches/4.3.0/sid;
4.3.0-0pre1v5 will (does?) have this patch, however it appears it's
broken for 2.4 kernels (see James's message below).

On Fri, Nov 14, 2003 at 08:17:35PM +0000, James Troup wrote:
> I haven't had a chance to investigate this yet, so no bug, but I
> thought I'd at least warn you.  This was the 3rd attempt on vore.  The
> first had an out-of-date linux-kernel-headers installed in the chroot,
> so I freshened the chroot and retried.  #2 got bitten by the sparc32
> fuckage (see sparc-utils changelog for details).  #3 (below) was in an
> up-to-date chroot (with working sparc32)
> 
> | Automatic build of xfree86_4.2.1-14 on vore by sbuild/sparc 1.170.4
> | Build started at 20031114-1051
> | ******************************************************************************
> 
> [...]
> 
> | ** Using build dependencies supplied by package:
> | Build-Depends: dpkg (>= 1.7.0), cpp-3.2, flex-old, bison, bsdmainutils, groff, zlib1g-dev | libz-dev, libncurses5-dev | libncurses-dev, libpam0g-dev | libpam-dev, libfreetype6-dev, libpaperg, libstdc++5-dev | libstdc++-dev, tetex-bin, po-debconf, debhelper (>= 4.1.16), html2text, libglide2-dev (>> 2001.01.26) [i386], libglide3-dev (>> 2001.01.26) [alpha i386], kernel-headers-2.4 | hurd | freebsd | netbsd | openbsd
> 
> [...]
> 
> | lnx_io.c: In function `KIOCSRATE_ioctl_ok':
> | lnx_io.c:128: error: structure has no member named `period'
> | lnx_io.c:130: error: structure has no member named `period'
> | lnx_io.c:131: error: structure has no member named `period'
> | make[8]: *** [lnx_io.o] Error 1
> 
> A complete build log can be found at
> http://buildd.debian.org/build.php?arch=sparc&pkg=xfree86&ver=4.2.1-14

Hmm, that's pretty bizzare, given this stanza:
/* Deal with spurious kernel header change */
#if defined(LINUX_VERSION_CODE) && defined(KERNEL_VERSION)
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,42)
#  define rate period
# endif
#endif

AFAICT, the only kernel headers on there are 2.4.21-sparc, and it should
only be tripping #define rate period if the version is >= 2.5.42 (this
is the case for both branches/4.3.0/sid and trunk, FWIW, and the only
mention of 'period' in the extracted directories is protected by the
L_V_C #if.

Shit, *sigh*. I take it you don't still have the build tree kicking
around? If not, could you please install the build-deps somewhere on
vore so I can have a poke at this?

Cheers,
Daniel

-- 
Daniel Stone                                                <daniels@debian.org>
Debian X Strike Force:                    http://people.debian.org/~branden/xsf/

Attachment: pgpJKEHCECDYJ.pgp
Description: PGP signature


Reply to: