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

2003-11-14 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

> # + sarge?
> tags 220814 + fixed-in-experimental
Bug#220814: X 4.3 FTBFS on hppa
Tags were: experimental
Tags added: fixed-in-experimental

> thanks mate
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)




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

2003-11-14 Thread Daniel Stone
# + sarge?
tags 220814 + fixed-in-experimental
thanks mate

On Fri, Nov 14, 2003 at 07:54:58PM +, 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.hSun May  5 21:11:34 2002
> +++ 1.4/include/linux/kd.hFri 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 KDKBDREP0x4B52  /* 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 +, 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<[EMAIL PROTECTED]>
Debian X Strike Force:http://people.debian.org/~branden/xsf/


pgpuM0sYfJK1i.pgp
Description: PGP signature


Bug#220814: X 4.3 FTBFS on hppa

2003-11-14 Thread Matthew Wilcox

Package: xserver-xfree86
Version: 4.3.0-0pre1v4
Severity: serious
Tags: experimental
X-Debbugs-CC: [EMAIL PROTECTED]

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.

gcc -c -g -O2 -ansi -pedantic -Wall -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations -Wredundant-decls \
-Wnested-externs -Wundef \
-I../../../../../../programs/Xserver/hw/xfree86/common \
-I../../../../../../programs/Xserver/hw/xfree86/os-support \
-I. -I../../../../../../programs/Xserver/include \
-I../../../../../../exports/include/X11 \
-I../../../../../../include/extensions \
-I../../../../../../programs/Xserver/hw/xfree86/os-support/shared \
-I../../../../../../programs/Xserver/mi \
-I../../../../../.. -I../../../../../../exports/include   -Dlinux \
-D__hppa__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE \
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -DSHAPE -DXINPUT -DXKB \
-DLBX -DXAPPGROUP -DXCSECURITY -DTOGCUP -DXF86BIGFONT -DDPMSExtension \
-DPIXPRIV -DPANORAMIX -DRENDER -DRANDR -DGCCUSESGAS -DAVOID_GLYPHBLT \
-DPIXPRIV -DSINGLEDEPTH -DXFreeXDGA -DXvExtension -DXFree86Server \
-DXF86VIDMODE -DXvMCExtension -DSMART_SCHEDULE -DBUILDDEBUG \
-DXResExtension -DX_BYTE_ORDER=X_BIG_ENDIAN -DNDEBUG -DFUNCPROTO=15 \
-DNARROWPROTO-DUSESTDRES -DHAVE_SYSV_IPC   lnx_io.c
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 KDKBDREP0x4B52  /* set keyboard delay/repeat rate;

Andries, care to explain why you broke XFree86?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk