Xorg 6.9.0

This description follows the instructions from BLFS. Here I only describe the differences in comparision to the BLFS book.

I recommend to build both 32-bit and 64-bit versions of Xorg in separte directories before trying to install anything.

32-bit build

I used the following host.def (must be copied to config/cf/host.def): Xorg-6.9.0-i386-host.def

Forcing 32-bit build

On a 32/64-bit multilib architectrue Xorg automatically defaults to a 64-bit build. I have overwritten this detection by changing lines 405 to 410 in file config/imake/imakemdep.h from:

 # ifdef __amd64__
         "-D__amd64__",
 # endif
 # ifdef __x86_64__
         "-D__amd64__",
 # endif

to:

 # ifdef __amd64__
         /*"-D__amd64__",*/
         "-m32",
         "-D__k6__",
 # endif
 # ifdef __x86_64__
         /*"-D__amd64__",*/
         "-m32",
         "-D__k6__",
 # endif

Changes as patch: Xorg-6.9.0-force-32bit.patch

Problem with librpcsvc.a

The 32-bit failed the first time with an compiler error that librpcsv.a could not be found. A solution was posted at the Cross-LFS mailing list:

http://linuxfromscratch.org/pipermail/cross-lfs/2005-November/000039.html

 On Wed, 2 Nov 2005, Ken Moffat wrote:

 > Oh dear, no librpcsvc.a in /usr/lib (-m32) using glibc-2001017.  This has 
 > caused x.org (6.9.0-rc1) to fail to link while building xdm for -m32. 
 > Bummer.
 >
  Fixed by sedding out xdm from programs/Imakefile.  Obviously, I can't 
 use xdm on a 32-bit-only desktop.  Possible side effect is that kdebase 
 won't be able to build (as much) 32-bit, but then who would want to 
 build a 32-bit kde on x86_64 ?

 No problems with 64-bit X, issue closed.

 Ken

So I changed line 52 of program/Imakefile from:

        XDMSRCDIR = xdm 

to:

 /*       XDMSRCDIR = xdm */

A following make Everything continued the build, but was interrupted by another error.

Undefined type __u16

Another problem occured (also in 64-bit build) while making lnx_agp.o in directory programs/Xserver/hw/xfree86/os-support/linux stating that __u16 was undefined:

 In file included from lnx_agp.c:24:
 /usr/include/linux/agpgart.h:55: error: parse error before "__u16"
 /usr/include/linux/agpgart.h:60: error: field `version' has incomplete type
 /usr/include/linux/agpgart.h:61: error: parse error before "__u32"
 /usr/include/linux/agpgart.h:68: error: parse error before '}' token
 /usr/include/linux/agpgart.h:71: error: parse error before "__u32"
 /usr/include/linux/agpgart.h:92: error: parse error before "__u32"
 /usr/include/linux/agpgart.h:106: error: parse error before "__u32"
 lnx_agp.c: In function GARTInit':
 lnx_agp.c:65: error: storage size of 'agpinf' isn't known
 lnx_agp.c:65: warning: unused variable `agpinf'
 lnx_agp.c: In function `xf86GetAGPInfo':
 lnx_agp.c:129: error: storage size of 'agpinf' isn't known
 lnx_agp.c:129: warning: unused variable `agpinf'
 lnx_agp.c: In function `xf86AllocateGARTMemory':
 lnx_agp.c:221: error: storage size of 'alloc' isn't known
 lnx_agp.c:221: warning: unused variable `alloc'
 lnx_agp.c: In function `xf86DeallocateGARTMemory':
 lnx_agp.c:267: warning: cast to pointer from integer of different size
 lnx_agp.c: In function `xf86UnbindGARTMemory':
 lnx_agp.c:324: error: storage size of 'unbind' isn't known
 lnx_agp.c:324: warning: unused variable `unbind'
 lnx_agp.c: In function `xf86EnableAGP':
 lnx_agp.c:356: error: parse error before "setup"
 lnx_agp.c:361: error: `setup' undeclared (first use in this function)
 lnx_agp.c:361: error: (Each undeclared identifier is reported only once
 lnx_agp.c:361: error: for each function it appears in.)
 make: *** [lnx_agp.o] Error 1

This type is normally defined in <linux/types.h>, along with other similar ones. The source of that error I got was the inclusion of <sys/kd.h> in file programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h which explicitly omits the inclusion of <linux/types.h>. I don't know the reason for that, so I changed lines 12 to 17 in file programs/Xserver/hw/xfree86/os-support/linux/lnx_agp.c from:

 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
 #endif

 #include <X11/X.h>
 #include "xf86.h"

to:

 #ifdef HAVE_XORG_CONFIG_H
 #include <xorg-config.h>
 #endif

 #include <linux/types.h>
 #include <X11/X.h>
 #include "xf86.h"

Changes as patch: Xorg-6.9.0-undef-type-u16-fix.patch

After this change followed by a make Everything the build completed successfully.

64-bit build

I used the following host.def (must be copied to config/cf/host.def): Xorg-6.9.0-x86_64-host.def

Note that I enabled xterm to be build which is disabled by default.

The only problem I encountered was the Undefined type __16 error as explained for the 32-bit build above.

Installing

After both builds completed both can be installed with the commands:

 make install &&
 make install.man &&
 ln -v -s -f ../X11R6/bin /usr/bin/X11 &&
 ln -v -s -f ../X11R6/lib/X11 /usr/lib/X11 &&
 ln -v -s -f ../X11R6/include/X11 /usr/include/X11

The library directories lib and lib64 are chosen correctely by Xorg.

Zuletzt geändert am 29 September 2006 18:30 Uhr von chrschn