Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 17345 - KBD structure name changed from 2.4.x to 2.5.x and 2.6.x causing XFree86 4.3.0 compile failure
Summary: KBD structure name changed from 2.4.x to 2.5.x and 2.6.x causing XFree86 4.3....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
: 22473 36535 36683 37942 40104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-03-12 00:13 UTC by Eric Shattow
Modified: 2004-02-13 12:28 UTC (History)
7 users (show)

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


Attachments
Patch that fixes failure to compile X 4.3 on Linux 2.5 kernel includes (xf.patch,2.45 KB, patch)
2003-05-08 00:35 UTC, Blu3
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Shattow 2003-03-12 00:13:39 UTC
if you get a compile failure when emerge'ing xfree on a gentoo box running the
new development kernels, 2.5.x, the reason is a change in the name of a data
structure from ".rate"  to ".period"

the relevent xfree source files are lnx_io.c (i think) and another one starting
with lnx_

i'm too lazy to remember what i did, but i changed all instances of ".rate "
with ".period " in the relevent files, and xfree compiled fine.


i have no idea how to submit a patch that checks for the version of linux
sources before applying.


the relevant lines from  /usr/include/linux/kd.h:
...
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" */
};
...

so yeah, this goofs up the compilation of xfree for people with 2.5.x kernels
and the headers properly installed.

on a good note, 2.5.x is really nice with the builtin ALSA support.  very slick.

happy patchmaking!



Reproducible: Always
Steps to Reproduce:
1. use development kernel (2.5.x)
2. emerge xfree
3. :)

Actual Results:  
(didn't save the actual output.  complains about missing structure member named
rate)

Expected Results:  
compiled without error.

erisha@lucy erisha $ uname -a
Linux lucy.shadow.rrd 2.5.63 #1 Thu Feb 27 23:52:03 CST 2003 i686 Pentium III
(Coppermine) GenuineIntel GNU/Linux


erisha@lucy erisha $ uptime
 22:56:41 up  4:48,  1 user,  load average: 0.10, 0.26, 0.29


erisha@lucy erisha $ emerge -s xfree
Searching...   
[ Results for search key : xfree ]
[ Applications found : 2 ]
 
*  x11-base/xfree
      Latest version available: 4.3.0-r1
      Latest version installed: 4.3.0-r1
      Size of downloaded files: 68,956 kB
      Homepage:    http://www.xfree.org
      Description: Xfree86: famous and free X server
Comment 1 Blu3 2003-05-08 00:35:39 UTC
Created attachment 11671 [details, diff]
Patch that fixes failure to compile X 4.3 on Linux 2.5 kernel includes

The two files are lnx_io.c and lnx_kbd.c

After a short search on google, the XF86 folks seem to be standing tall on
their tailcoats and insist this is a "kernel folks problem".

We need a patch added to the fat Xfree86 patch tarball to change .rate into
.period.

/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c and lnx_kbd.c

Will the applicable maintainer please add this?  Numerous people are starting
to run into this, in particular anyone running a 2.5 kernel.  With 2.6
apparently going to be released in about two months, it's prudent to get this
patch in.
Comment 2 Michael Cohen (RETIRED) gentoo-dev 2003-06-08 19:23:13 UTC
I'll take a look at it but I built -r3 with no problem on 2.5.70-mm6.

You'd use #ifdef to check versions.
Comment 3 Willem 3 de Bruijn 2003-08-03 06:43:53 UTC
naturally, not everyone having a kernel > 2.5.43 has this problem. Since gentoo 
normally separates your kernel sources from the headers many users will not 
encounter this error. Only if you unmerge linux-headers and manually add symlinks to 
/usr/src/linux/include/[asm|asm-generic|linux] and your kernel version is >~ 2.5.43 will 
your xfree emerge break. 
 
use the patch or manually rename all .rate entries to .period in lnx_io.c and lnx_kbd.c 
Comment 4 Donnie Berkholz (RETIRED) gentoo-dev 2003-11-13 20:11:03 UTC
*** Bug 22473 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Bevitt 2003-11-26 18:53:30 UTC
This should go in the pile of fixes to be included when the linux-headers
are moved over to the 2.6 branch. Im aware that this might take a while 
considering there are quite a few syscalls that have been renamed or taken
out of the kernel.

Is this still an issue with the 4.3.99 releases as we will probably see 
XFree 4.4 around the same time we see the 2.6.0 kernel released?
Comment 6 Donnie Berkholz (RETIRED) gentoo-dev 2003-12-27 05:10:20 UTC
*** Bug 36535 has been marked as a duplicate of this bug. ***
Comment 7 Martin Holzer (RETIRED) gentoo-dev 2003-12-28 15:28:20 UTC
*** Bug 36683 has been marked as a duplicate of this bug. ***
Comment 8 Donnie Berkholz (RETIRED) gentoo-dev 2003-12-28 15:43:38 UTC
It's not an issue on 4.3.99, and both comments #6 and #7 hold backport patches that should be added to the next patchset.
Comment 9 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-08 09:55:50 UTC
*** Bug 37942 has been marked as a duplicate of this bug. ***
Comment 10 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-10 11:58:15 UTC
This is in -r4.
Comment 11 Donnie Berkholz (RETIRED) gentoo-dev 2004-02-13 12:28:47 UTC
*** Bug 40104 has been marked as a duplicate of this bug. ***