BLFS‎ > ‎

5. Xorg

created : 2010-02-12   updated : 2010-02-12
 
Create build folder :
 
mkdir /blfs/xc &&
cd /blfs/xc
 
Prepare environment variable :
 
export XORG_PREFIX="/usr"
 
export XORG_CONFIG="--prefix=$XORG_PREFIX --sysconfdir=/etc \
--mandir=$XORG_PREFIX/share/man --localstatedir=/var"
 
Packages in Xorg store their configuration files in $XORG_ PREFIX/ lib/ X11 by default. This is strictly against FHS guidelines. To simplify installation, create the proper installation directories in / etc/ X11 and create symlinks in $XORG_ PREFIX/ lib/ X11 to satisfy the installation. Execute the following commands as the root user:
install -v -m755 -d \
/etc/X11/{app-defaults,fs,twm,xdm,xinit,xkb,xsm} &&
install -v -m755 -d $XORG_PREFIX/lib/X11 &&
for link in \
/etc/X11/{app-defaults,fs,twm,xdm,xinit,xkb,xsm}
do
ln -sv $link $XORG_PREFIX/lib/X11
done
 
Xorg Protocol Headers
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/proto/
‧ Download (FTP): ftp://ftp.x.org/pub/individual/proto/
‧ Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/proto-7.2.md5
‧ Download size: 1.4 MB
‧ Estimated disk space required: 4.0 MB
‧ Estimated build time: 0.2 SBU
‧ Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/proto-7.2.wget
 
Download file list and checksum :
 
cd /blfs/xc
wget http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/proto-7.2.wget
wget http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/proto-7.2.md5
 
Downloading Xorg Protocol Headers :
mkdir proto &&
cd proto &&
grep -v '^#' ../proto-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/proto/ &&
md5sum -c ../proto-7.2.md5
 
create build script :
 
cat >build_proto.sh << "EOF"

section=proto
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
./configure $XORG_CONFIG
make
make install
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_proto.sh

Build and install :
 
time ./build_proto.sh
 
real    3m31.403s
user    0m24.542s
sys     2m24.529s
 
pkg-config-0.22
The pkg-config package contains a tool for passing the include path and/or library paths to build tools during the
configure and make file execution.
Package Information
‧ Download (HTTP): http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz
‧ Download MD5 sum: fd5c547e9d66ba49bc735ccb8c791f2a
‧ Download size: 1.0 MB
‧ Estimated disk space required: 12 MB
‧ Estimated build time: 0.3 SBU
 
Download :
cd /blfs/xc
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz
 
Unpack source :
cd /blfs/xc
tar xvf pkg-config-0.22.tar.gz
cd pkg-config-0.22
 
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install ;
}
 
real    4m24.920s
user    0m37.334s
sys     3m32.185s
 
Configuring pkg-config :
The default setting for PKG_CONFIG_PATH is /usr/lib/pkgconfig:/usr/share/pkgconfig because of the prefix used to install pkg-config. You may add to PKG_CONFIG_PATH by exporting additional paths on your system where .pc files are installed. Note that PKG_CONFIG_PATH is only needed when compiling packages, not during run-time.
 
Xorg Utilities
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/util/
‧ Download (FTP): ftp://ftp.x.org/pub/individual/util/
‧ Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/util-7.2.md5
‧ Download size: 664 KB
‧ Estimated disk space required: 5.2 MB
‧ Estimated build time: 0.1 SBU
‧ Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/util-7.2.wget
Xorg Utilities Dependencies
Required
pkg-config-0.22 and Xorg Protocol Headers
 
Download wget-list and checksum
 
cd /blfs/xc
wget http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/util-7.2.wget
wget http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/util-7.2.md5

Downloading Xorg Utilities
mkdir util &&
cd util &&
grep -v '^#' ../util-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/util/ &&
md5sum -c ../util-7.2.md5
 
Create build script :
 
cat >build_util.sh << "EOF"
section=util
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
./configure $XORG_CONFIG
make
make install
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_util.sh
 
Build and install :
time ./build_util.sh
 
real    1m23.748s
user    0m11.185s
sys     1m2.492s

 
libXau-1.0.3
The libXau package contains a library implementing the X11 Authorization Protocol. This is useful for restricting
client access to the display.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/lib/libXau-1.0.3.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/lib/libXau-1.0.3.tar.bz2
‧ Download MD5 sum: 75a9f2b85cd1617b5ca98c9095323853
‧ Download size: 224 KB
‧ Estimated disk space required: 2.0 MB
‧ Estimated build time: less than 0.1 SBU
 
libXau Dependencies
Required
Xorg Protocol Headers
 
Unpack source :
cd /blfs/xc
tar xvf libXau-1.0.3.tar.bz2
cd libXau-1.0.3
 
Build and install :
time {
./configure $XORG_CONFIG &&
make &&
make install ;
}
 
real    1m14.661s
user    0m9.209s
sys     1m0.708s
 
libXdmcp-1.0.2
The libXdmcp package contains a library implementing the X Display Manager Control Protocol. This is useful for
allowing clients to interact with the X Display Manager.
Package Information
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/lib/libXdmcp-1.0.2.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/lib/libXdmcp-1.0.2.tar.bz2
‧ Download MD5 sum: 10facf2bc7cbd5e5c1a698b8a210a582
‧ Download size: 216 KB
‧ Estimated disk space required: 2.5 MB
‧ Estimated build time: 0.1 SBU

libXdmcp Dependencies
Required
Xorg Protocol Headers
 
Unpack source
cd /blfs/xc
tar xvf libXdmcp-1.0.2.tar.bz2
cd libXdmcp-1.0.2
 
Build and install :
time {
./configure $XORG_CONFIG &&
make &&
make install ;
}
 
real    2m7.200s
user    0m15.273s
sys     1m47.875s
 
xcb-proto-1.0
The xcb-proto package provides the XML-XCB protocol descriptions that libxcb uses to generate the majority of its code and API.
‧ Download (HTTP): http://xcb.freedesktop.org/dist/xcb-proto-1.0.tar.bz2
‧ Download MD5 sum: d31407eaae7e52d100645217767a41aa
‧ Download size: 69.4 KB
‧ Estimated disk space required: 788 KB
‧ Estimated build time: less than 0.1 SBU

Unpack source
cd /blfs/xc
tar xvf xcb-proto-1.0.tar.bz2
cd xcb-proto-1.0
 
Build and install :
time {
./configure $XORG_CONFIG &&
make &&
make install &&
install -dv -m755 ${XORG_PREFIX}/share/doc/xcb-proto-1.0 &&
install -v -m644 doc/* ${XORG_PREFIX}/share/doc/xcb-proto-1.0 ;
}
 
real    0m8.004s
user    0m0.880s
sys     0m5.676s
 
libxml2-2.6.31
The libxml2 package contains XML libraries. These are useful for parsing XML files.
‧ Download (HTTP): http://xmlsoft.org/sources/libxml2-2.6.31.tar.gz
‧ Download (FTP): ftp://xmlsoft.org/libxml2/libxml2-2.6.31.tar.gz
‧ Download MD5 sum: 714b0683b1ec4bdc63bc356d729f9b18
‧ Download size: 4.7 MB
‧ Estimated disk space required: 85 MB (additional 184 MB to run the test suite)
‧ Estimated build time: 1.3 SBU (additional 1.0 SBU to run the test suite)
 
Unpack source :
cd /blfs/xc
tar xvf libxml2-2.6.31.tar.gz
cd libxml2-2.6.31
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install ;
}
 
real    8m21.320s
user    1m57.923s
sys     6m8.675s
 
libxslt-1.1.22
The libxslt package contains XSLT libraries. These are useful for extending libxml2 libraries to support XSLT files.
• Download (HTTP): http://xmlsoft.org/sources/libxslt-1.1.22.tar.gz
• Download (FTP): ftp://xmlsoft.org/libxslt/libxslt-1.1.22.tar.gz
• Download MD5 sum: d6a9a020a76a3db17848d769d6c9c8a9
• Download size: 2.7 MB
• Estimated disk space required: 39 MB
• Estimated build time: 0.4 SBU

libxslt Dependencies
Required
libxml2-2.6.31
 
Optional
Python-2.5.2 and Libgcrypt-1.2.4
 
Unpack source
cd /blfs/xc
tar xvf libxslt-1.1.22.tar.gz
cd libxslt-1.1.22
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install ;
}
 
real    3m44.759s
user    0m35.774s
sys     3m1.271s
 
libpthread-stubs-0.1
The libpthread-stubs package provides weak aliases for pthread functions not provided in libc or otherwise available by default. This is useful for libraries that rely on pthread stubs to use pthreads optionally. On Linux, all necessary pthread functions are available, so this package is simply a placeholder.
 
‧ Download (HTTP): http://xcb.freedesktop.org/dist/libpthread-stubs-0.1.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/lib/libpthread-stubs-0.1.tar.bz2
‧ Download MD5 sum: 774eabaf33440d534efe108ef9130a7d
‧ Download size: 190 KB
‧ Estimated disk space required: 1.6 MB
‧ Estimated build time: less than 0.1 SBU
 
Unpack source :
cd /blfs/xc
tar xvf libpthread-stubs-0.1.tar.bz2
cd libpthread-stubs-0.1
 
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install ;
}
 
real    1m0.880s
user    0m7.772s
sys     0m50.147s
 
libxcb-1.0
The libxcb package provides an interface to the X Window System protocol, which replaces the current Xlib interface.
Xlib can also use XCB as a transport layer, allowing software to make requests and receive responses with both.
 
‧ Download (HTTP): http://xcb.freedesktop.org/dist/libxcb-1.0.tar.bz2
‧ Download MD5 sum: 0eb951fd0fa9542dbe4fc3530b81a3b6
‧ Download size: 410 KB
‧ Estimated disk space required: 15.0 MB
‧ Estimated build time: 0.4 SBU
Additional Downloads
‧ Required patch to workaround X11 locking bugs in other applications:
http://www.linuxfromscratch.org/patches/blfs/6.3/libxcb-1.0-sloppy_lock-1.patch
 
libxcb Dependencies
Required
libXau-1.0.3, libXdmcp-1.0.2, libpthread-stubs-0.1, xcb-proto-1.0, and libxslt-1.1.22
 
 
 
Unpack source :
cd /blfs/xc
tar xvf libxcb-1.0.tar.bz2
cd libxcb-1.0

Build and install :
time {
patch -Np1 -i ../libxcb-1.0-sloppy_lock-1.patch &&
./configure $XORG_CONFIG --docdir='${datadir}'/doc/libxcb-1.0 &&
make &&
make install ;
}
 
real    4m51.967s
user    0m54.315s
sys     3m47.606s
 
Configuring libxcb
Configuration Information
The libxcb developers have decided to be strict in asserting locking bugs in X11 applications. This is different than the behavior of libX11 when used on its own, and it will cause some applications to crash when they previously did not. When an application has these types of bugs, it will crash with the following assertion:
xcb_xlib_lock: Assertion `!c->xlib.lock' failed.

The patch applied above to libxcb adds an environment variable, LIBXCB_ ALLOW_ SLOPPY_ LOCK, to be set which will allow the locking bugs to not crash the application. It is a workaround that is known to be needed in a few cases. If it is found that these bugs affect an application in use, add the following to your system or personal profile:
export LIBXCB_ALLOW_SLOPPY_LOCK=1
 
 
Ed-0.8
Ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. Ed isn't something which many people use. It's described here because it can be used by the patch program if you encounter an ed-based patch file. This happens rarely because diff-based patches are preferred these days.

• Download (HTTP): http://ftp.gnu.org/pub/gnu/ed/ed-0.8.tar.bz2
• Download (FTP): ftp://ftp.gnu.org/pub/gnu/ed/ed-0.8.tar.bz2
• Download MD5 sum: b359451fb32097974484b5ba7c19f5fb
• Download size: 66 KB
• Estimated disk space required: 1.3 MB
• Estimated build time: Less than 0.1 SBU
 
Unpack source :
cd /blfs/xc
tar xvf ed-0.8.tar.bz2
cd ed-0.8
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install &&
make install-man ;
}
 
 
Ed-0.8
Ed is a line-oriented text editor. It is used to create, display, modify and otherwise manipulate text files, both interactively and via shell scripts. Ed isn't something which many people use. It's described here because it can be used by the patch program if you encounter an ed-based patch file. This happens rarely because diff-based patches are preferred these days.

• Download (HTTP): http://ftp.gnu.org/pub/gnu/ed/ed-0.8.tar.bz2
• Download (FTP): ftp://ftp.gnu.org/pub/gnu/ed/ed-0.8.tar.bz2
• Download MD5 sum: b359451fb32097974484b5ba7c19f5fb
• Download size: 66 KB
• Estimated disk space required: 1.3 MB
• Estimated build time: Less than 0.1 SBU
 
Unpack source :
cd /blfs/xc
tar xvf ed-0.8.tar.bz2
cd ed-0.8
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install &&
make install-man ;
}
 
real    0m9.843s
user    0m1.124s
sys     0m4.104s
 
FreeType-2.3.7
The FreeType2 package contains a library to allow applications to properly render TrueType fonts.
‧ Download (HTTP): http://downloads.sourceforge.net/freetype/freetype-2.3.7.tar.bz2
‧ Download (FTP): ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/freetype-2.3.7.tar.bz2
‧ Download MD5 sum: 83306194817ebdea554133b4232a34aa
‧ Download size: 1.3 MB
‧ Estimated disk space required: 28.2 (includes installing additional documentation)
‧ Estimated build time: 0.4 SBU
Additional Documentation
‧ Download (HTTP): http://downloads.sourceforge.net/freetype/freetype-doc-2.3.7.tar.bz2
‧ Download (FTP): ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/freetype-doc-2.3.7.tar.bz2
‧ Download MD5 sum: 2ba135e6a126ed86e9b462167511ced8
‧ Download size: 97 KB
 
Unpack source :
cd /blfs/xc
tar xvf freetype-2.3.7.tar.bz2
cd freetype-2.3.7
tar xf ../freetype-doc-2.3.7.tar.bz2 \
--strip-components=2 -C docs
 
 
 
Build and install :
time {
sed -i -r -e 's:.*(#.*BYTE.*) .*:\1:' \
-e 's:.*(#.*SUBPIX.*) .*:\1:' \
include/freetype/config/ftoption.h &&
./configure --prefix=/usr &&
make &&
make install &&
install -v -m755 -d /usr/share/doc/freetype-2.3.7 &&
cp -v -R docs/* /usr/share/doc/freetype-2.3.7 ;
}
 
real    2m24.733s
user    0m20.385s
sys     1m30.654s
 
Command Explanations
sed -i ... 's:.*(#.*BYTE.*) .*:\1:' ... 's:.*(#.*SUBPIX.*) .*:\1:' include/freetype/config/ftoption.h:
This command enables the TrueType native bytecode interpreter and LCD optimized rendering features. These options result in improved rendering of fonts, but may have patent restrictions. Be sure to read http:// www. freetype. org/ patents. html before enabling these options.
 
Fontconfig-2.4.2
The Fontconfig package is a library for configuring and customizing font access.
‧ Download (HTTP): http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
‧ Download (FTP): ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/fontconfig-2.4.2.tar.gz
‧ Download MD5 sum: f035852f521b54677f2b5c9e2f6d54a4
‧ Download size: 1.2 MB
‧ Estimated disk space required: 11.3 MB
‧ Estimated build time: 0.2 SBU
 
Fontconfig Dependencies
Required
FreeType-2.3.7 and either expat-2.0.1 or libxml2-2.6.31 (requires pkg-config-0.22)
Optional
DocBook-utils-0.6.14
 
Note
If you have DocBook-utils installed and you remove the - - disable- docs parameter from the configure command below, you must have SGMLSpm-1.03ii and JadeTeX-3.13 installed also, or the Fontconfig build will fail.
 
Unpack source :
cd /blfs/xc
tar xvf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
 
Build and install :
time {
./configure --prefix=/usr \
--sysconfdir=/etc --localstatedir=/var \
--disable-docs --without-add-fonts \
--with-docdir=/usr/share/doc/fontconfig-2.4.2 &&
make &&
make install &&
install -v -m644 doc/*.3 /usr/share/man/man3 &&
install -v -m644 doc/*.5 /usr/share/man/man5 &&
install -v -m755 \
-d /usr/share/doc/fontconfig-2.4.2/fontconfig-devel &&
install -v -m644 doc/*.{html,pdf,txt} \
/usr/share/doc/fontconfig-2.4.2 &&
install -v -m644 doc/fontconfig-devel/* \
/usr/share/doc/fontconfig-2.4.2/fontconfig-devel ;
}
 
real    3m20.382s
user    0m21.893s
sys     2m12.812s
 
Config Files
/etc/fonts/*, /etc/fonts/conf.avail/*, and /etc/fonts/conf.d/*
 
Configuration Information
The main configuration file for Fontconfig is /etc/fonts/fonts.conf. Generally you do not want to edit this file. It will also read /etc/fonts/local.conf and any files in /etc/fonts/conf.d. To put a new font directory in the configuration, create (or update) the /etc/fonts/local.conf file with your local information or add a new file in /etc/fonts/conf.d. The default location of fonts in Fontconfig is:
‧ /usr/share/fonts
‧ ~/.fonts
Fontconfig also ships many example configuration files in the /etc/fonts/conf.avail directory. Symlinking to specific files from /etc/fonts/conf.d will enable them. The default setup is generally good enough for most users. See /etc/fonts/conf.avail/README for a description of the configuration files.

More information about configuring Fontconfig can be found in the user's manual in
file:///usr/share/doc/fontconfig-2.4.2/fontconfig-user.html
 
 
Xorg Libraries
The Xorg libraries provide library routines that are used within all X Window applications.
• Download (HTTP): http://xorg.freedesktop.org/releases/individual/lib/
• Download (FTP): ftp://ftp.x.org/pub/individual/lib/
• Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/lib-7.2.md5
• Download size: 11.4 MB
• Estimated disk space required: 186 MB
• Estimated build time: 6.6 SBU
Additional Downloads
• Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/lib-7.2.wget
• Required patch: http://www.linuxfromscratch.org/patches/blfs/6.3/libX11-1.1.2-badargs-1.patch
• Required patch: http://www.linuxfromscratch.org/patches/blfs/6.3/libXfont-1.2.8-pcf_parser-1.patch
 
Xorg Libraries Dependencies
Required
Ed-0.8, Fontconfig-2.4.2, pkg-config-0.22, Xorg Protocol Headers, and libXdmcp-1.0.2
Optional
libxcb-1.0
 
Downloading Xorg Libraries
cd /blfs/xc
mkdir lib &&
cd lib &&
grep -v '^#' ../lib-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/lib/ &&
md5sum -c ../lib-7.2.md5
 
 
Create build script :
cat >build_lib.sh << "EOF"
section=lib
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
case $(basename "$PWD") in
libX11-1.1.2 )
patch -Np1 -i ../../libX11-1.1.2-badargs-1.patch &&
sed -i 's/_XGet/XGet/' modules/im/ximcp/imDefLkup.c
;;
libXfont-1.2.8 )
patch -Np1 -i ../../libXfont-1.2.8-pcf_parser-1.patch &&
sed -i 's/(ft_isdigit/(isdigit/' src/FreeType/fttools.c
;;
esac &&
./configure $XORG_CONFIG
make
make install
ldconfig
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_lib.sh
 
Build and install :
time ./build_lib.sh
 
real    94m3.795s
user    9m47.045s
sys     64m17.677s
 
Xbitmaps-1.0.1
Xbitmaps provides static graphics needed by Xorg applications to draw screen elements.
• Download (HTTP): http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.0.1.tar.bz2
• Download (FTP): ftp://ftp.x.org/pub/individual/data/xbitmaps-1.0.1.tar.bz2
• Download MD5 sum: b28a9840cde3c38d7c09716372fea257
• Download size: 54 KB
• Estimated disk space required: 1.7 MB
• Estimated build time: less than 0.1 SBU
 
Xbitmaps Dependencies
Required
Xorg Utilities
 
Unpack source :
cd /blfs/xc
tar xvf xbitmaps-1.0.1.tar.bz2
cd xbitmaps-1.0.1
 
Build and install :
time {
./configure $XORG_CONFIG &&
make install ;
}
 
real    0m10.602s
user    0m1.088s
sys     0m6.488s
 
libpng-1.2.29
The libpng package contains libraries used by other programs for reading and writing PNG files.
Package Information
• Download (HTTP): http://downloads.sourceforge.net/libpng/libpng-1.2.29.tar.bz2
• Download MD5 sum: f588cb4ee39e3a333604096f937ea157
• Download size: 616 KB
• Estimated disk space required: 11.5 MB
• Estimated build time: 0.3 SBU
 
Unpack source :
cd /blfs/xc
tar xvf libpng-1.2.29.tar.bz2
cd libpng-1.2.29
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install &&
install -v -m755 -d /usr/share/doc/libpng-1.2.29 &&
install -v -m644 README libpng-1.2.29.txt \
/usr/share/doc/libpng-1.2.29 ;
}
 
real    1m44.246s
user    0m13.709s
sys     1m7.888s
 
Configuring libpng
Configuration Information
As with most libraries, there is no configuration to do, save that the library directory, i.e., /opt/lib or /usr/local/lib should appear in /etc/ld.so.conf so that ldd can find the shared libraries. After checking that this is the case, /sbin/ldconfig should be run while logged in as root.
 
 
libdrm-2.3.0
libdrm provides core library routines for the X Window System to directly interface with video hardware using the Linux kernel's Direct Rendering Modules.
‧ Download (HTTP): http://dri.freedesktop.org/libdrm/libdrm-2.3.0.tar.gz
‧ Download (FTP): ftp://ftp.linux.ee/pub/gentoo/distfiles/distfiles/libdrm-2.3.0.tar.gz
‧ Download MD5 sum: f2f5d3186bee51be49e1389bed39a7ed
‧ Download size: 382 KB
‧ Estimated disk space required: 2.7 MB
‧ Estimated build time: 0.1 SBU
 
Unpack source :
cd /blfs/xc
tar xvf libdrm-2.3.0.tar.gz
cd libdrm-2.3.0
 
Build and install :
time {
./configure --prefix=$XORG_PREFIX &&
make &&
make install ;
}
 
real    1m3.856s
user    0m6.332s
sys     0m44.551s
 
Expat-2.0.1
The Expat package contains a stream oriented C library for parsing XML.
• Download (HTTP): http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz
• Download MD5 sum: ee8b492592568805593f81f8cdf2a04c
• Download size: 446 KB
• Estimated disk space required: 6 MB
• Estimated build time: 0.1 SBU
 
Unpack source :
cd /blfs/xc
tar xvf expat-2.0.1.tar.gz
cd expat-2.0.1
 
Build and install :
time {
./configure --prefix=/usr &&
make &&
make install &&
install -v -m755 -d /usr/share/doc/expat-2.0.1 &&
install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-2.0.1 ;
}
 
real    1m22.427s
user    0m12.317s
sys     0m55.459s
 
MesaLib-6.5.2
Mesa is an OpenGL compatible 3-D graphics library.
‧ Download (HTTP): http://downloads.sourceforge.net/mesa3d/MesaLib-6.5.2.tar.bz2
‧ Download MD5 sum: e4d894181f1859651658b3704633e10d
‧ Download size (including recommended download): 3.1 MB
‧ Estimated disk space required (including recommended download): 172 MB
‧ Estimated build time (including recommended download): 1.6 SBU
Additional Downloads
Recommended demonstration and diagnostic utilities for verifying OpenGL operation
‧ Download (HTTP): http://downloads.sourceforge.net/mesa3d/MesaDemos-6.5.2.tar.bz2
‧ Download MD5 sum: e870efe98d3a50be01ab211b9b2e25d9
‧ Download size: 1.3 MB
Optional GLUT library (see also freeglut-2.4.0)
‧ Download (HTTP): http://downloads.sourceforge.net/mesa3d/MesaGLUT-6.5.2.tar.bz2
‧ Download MD5 sum: e84edbb11c69c8e408dfadd2ed08e95b
‧ Download size: 306 KB
MesaLib Dependencies
Required
Xorg Libraries, Xorg Utilities, libdrm-2.3.0, and expat-2.0.1
 
Unpack source :
cd /blfs/xc
tar xvf MesaLib-6.5.2.tar.bz2
tar xvf MesaDemos-6.5.2.tar.bz2
tar xvf MesaGLUT-6.5.2.tar.bz2
cd Mesa-6.5.2
 
Build and install :
time {
make linux-dri-x86 OPT_FLAGS="-O2 -fno-strict-aliasing" \
DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri \
X11_INCLUDES=-I${XORG_PREFIX}/include \
EXTRA_LIB_PATH=-L${XORG_PREFIX}/lib &&
make -C progs/xdemos PROGS='glxinfo glxgears' &&
make install INSTALL_DIR=${XORG_PREFIX} \
DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri &&
install -dv ${XORG_PREFIX}/share/doc/MesaLib-6.5.2 &&
install -v -m644 docs/* ${XORG_PREFIX}/share/doc/MesaLib-6.5.2 &&
install -v -m755 progs/xdemos/glx{info,gears} ${XORG_PREFIX}/bin ;
}
 
real    14m10.638s
user    2m17.601s
sys     8m22.283s
 
 
Tip
Do not remove the Mesa source tree yet, it will be required to build the Xorg-Server-1.2.0.
 
Xorg Applications
The Xorg applications provide the expected applications available in previous X Window implementations.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/app/
‧ Download (FTP): ftp://ftp.x.org/pub/individual/app/
‧ Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/app-7.2.md5
‧ Download size: 9.0 MB
‧ Estimated disk space required: 30.7 MB
‧ Estimated build time: 2.9 SBU
Additional Downloads
‧ Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/app-7.2.wget
 
Xorg Applications Dependencies
Required
xbitmaps-1.0.1, libpng-1.2.29, and Xorg Libraries
Recommended
MesaLib-6.5.2

Downloading Xorg Applications
cd /blfs/xc
mkdir app &&
cd app &&
grep -v '^#' ../app-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/app/ &&
md5sum -c ../app-7.2.md5
 
 
Create build script :
cat >build_app.sh << "EOF"
section=app
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
./configure $XORG_CONFIG
make
make install
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_app.sh
 
 
Build and install :
time ./build_app.sh
 
real    27m14.255s
user    2m50.663s
sys     17m30.930s
 
xcursor-themes-1.0.1
The xcursor-themes package contains the redglass and whiteglass animated cursor themes.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/data/xcursor-themes-1.0.1.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/lib/xcursor-themes-1.0.1.tar.bz2
‧ Download MD5 sum: 014bad415e64c49994679cdb71a97e37
‧ Download size: 2.1 MB
‧ Estimated disk space required: 19.5 MB
‧ Estimated build time: 0.1 SBU
xcursor-themes Dependencies
Required
Xorg Applications
 
Unpack source :
cd /blfs/xc
tar xvf xcursor-themes-1.0.1.tar.bz2
cd xcursor-themes-1.0.1
 
Build and install :
time {
./configure $XORG_CONFIG &&
make &&
make install ;
}
 
real    0m27.025s
user    0m2.296s
sys     0m16.525s
 
Xorg Fonts
The Xorg font packages provide needed fonts to the Xorg applications.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/font/
‧ Download (FTP): ftp://ftp.x.org/pub/individual/font/
‧ Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/font-7.2.md5
‧ Download size: 13.0 MB
‧ Estimated disk space required: 100 MB
‧ Estimated build time: 2.0 SBU
Additional Downloads
‧ Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/font-7.2.wget
 
Required
Xorg Applications and xcursor-themes-1.0.1
 
Downloading Xorg Fonts
cd /blfs/xc
mkdir font &&
cd font &&
grep -v '^#' ../font-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/font/ &&
md5sum -c ../font-7.2.md5
 
Create build script :
cat >build_font.sh << "EOF"
section=font
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
./configure $XORG_CONFIG
make
make install
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_font.sh

Build and install :
time ./build_font.sh
 
real    22m21.283s
user    2m15.608s
sys     13m7.553s
 
When all of the fonts have been installed, the system must be configured so that Fontconfig can find the TrueType fonts since they are outside of the default search path of /usr/share/fonts. Make symlinks to the Xorg TrueType font directories by running the following commands as the root user:
install -v -d -m755 /usr/share/fonts &&
ln -svn $XORG_PREFIX/lib/X11/fonts/OTF /usr/share/fonts/X11-OTF &&
ln -svn $XORG_PREFIX/lib/X11/fonts/TTF /usr/share/fonts/X11-TTF
 
 
XML::Parser-2.34
download :
cd /blfs/xc
wget http://cpan.org/authors/id/M/MS/MSERGEANT/XML-Parser-2.34.tar.gz
 
unpack :
cd /blfs/xc
tar xvf XML-Parser-2.34.tar.gz
cd XML-Parser-2.34
 
 
build and install :
time {
perl Makefile.PL &&
perl Makefile.PL PREFIX=/usr &&
make &&
make install ;
}
 
real    0m9.805s
user    0m1.664s
sys     0m6.024s
 
Clean up :
cd /blfs/xc
rm -rf XML-Parser-2.34
 
 
XKeyboardConfig-1.2
The XKeyboardConfig package contains the keyboard configuration database for the X Window System.
‧ Download (HTTP): http://xlibs.freedesktop.org/xkbdesc/xkeyboard-config-1.2.tar.bz2
‧ Download MD5 sum: 667c582a54d5715d24110c20e8c4be38
‧ Download size: 573 KB
‧ Estimated disk space required: 9.2 MB
‧ Estimated build time: less than 0.1 SBU
XKeyboardConfig Dependencies
Required
Xorg Applications and XML::Parser-2.34
Optional
intltool-0.35.5
 
Unpack source :
cd /blfs/xc
tar xvf xkeyboard-config-1.2.tar.bz2
cd xkeyboard-config-1.2
 
Build and install :
time {
./configure $XORG_CONFIG --with-xkb-rules-symlink=xorg &&
make &&
make install &&
install -dv -m755 $XORG_PREFIX/share/doc/xkeyboard-config-1.2 &&
install -v -m644 docs/{README,HOWTO}* \
$XORG_PREFIX/share/doc/xkeyboard-config-1.2 ;
}
 
real    1m22.876s
user    0m7.128s
sys     0m51.867s
 
Clean up :
 
cd /blfs/xc
rm -rf xkeyboard-config-1.2
 
 
Luit-1.0.2
Luit provides a filter for displaying and converting UTF-8 characters in text console windows.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/app/luit-1.0.2.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/app/luit-1.0.2.tar.bz2
‧ Download MD5 sum: aacda46598ce3af8ca16e2a8132db1b2
‧ Download size: 97 KB
‧ Estimated disk space required: 1 MB
‧ Estimated build time: 0.1 SBU
Luit Dependencies
Required
Xorg Fonts
 
Unpack source :
cd /blfs/xc
tar xvf luit-1.0.2.tar.bz2
cd luit-1.0.2
 
Build and install :
time {
./configure $XORG_CONFIG \
--with-localealiasfile=$XORG_PREFIX/share/X11/locale/locale.alias &&
make &&
make install ;
}
 
real    0m16.354s
user    0m1.888s
sys     0m10.585s

Clean up :
cd /blfs/xc
rm -rf luit-1.0.2
 
 
Xorg-Server-1.2.0

The Xorg Server is the core of the X Window system.
‧ Download (HTTP): http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.2.0.tar.bz2
‧ Download (FTP): ftp://ftp.x.org/pub/individual/xserver/xorg-server-1.2.0.tar.bz2
‧ Download MD5 sum: ea291c89e68832d570d9d5e007218bd6
‧ Download size: 5.7 MB
‧ Estimated disk space required: 425 MB
‧ Estimated build time: 4.9 SBU
Additional Downloads
‧ Required patch: http://www.linuxfromscratch.org/patches/blfs/6.3/xorg-server-1.2.0-security-1.patch
Xorg Server Dependencies
Required
Xorg Fonts and xkeyboard-config-1.2
Optional
MesaLib-6.5.2
 
Unpack source :
cd /blfs/xc
tar xvf xorg-server-1.2.0.tar.bz2
cd xorg-server-1.2.0

Multiple security vulnerabilities have been identified in the xorg-server package. Apply a patch to fix these vulnerabilities with the following command:
patch -Np1 -i ../xorg-server-1.2.0-security-1.patch
 
Build and install :
time {
./configure $XORG_CONFIG \
--with-mesa-source=/blfs/xc/Mesa-6.5.2 \
--with-module-dir=$XORG_PREFIX/lib/X11/modules \
--with-dri-driver-path=$XORG_PREFIX/lib/X11/modules/dri \
--with-xkb-output=/var/lib/xkb \
--enable-install-setuid &&
make &&
make install ;
}
 
real    84m35.863s
user    8m50.489s
sys     58m49.005s
 
Clean up :
cd /blfs/xc
rm -rf xorg-server-1.2.0
 
 
Xorg Drivers
The Xorg drivers provide the means for the xserver to take advantage of installed hardware.
• Download (HTTP): http://xorg.freedesktop.org/releases/individual/driver/
• Download (FTP): ftp://ftp.x.org/pub/individual/driver/
• Download MD5 sum: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/driver-7.2.md5
• Download size: 16.7 MB
• Estimated disk space required: 60.3 MB
• Estimated build time: 6.9 SBU
Additional Downloads
• Required download list: http://anduin.linuxfromscratch.org/files/BLFS/6.3/xorg/driver-7.2.wget
 
Xorg Drivers Dependencies
Required
Xorg-Server-1.2.0
Optional
MesaLib-6.5.2
 
Downloading Xorg Drivers
cd /blfs/xc
mkdir driver &&
cd driver &&
grep -v '^#' ../driver-7.2.wget | wget -i- -c \
-B http://xorg.freedesktop.org/releases/individual/driver/ &&
md5sum -c ../driver-7.2.md5
 
 
Create build script :
cat >build_driver.sh << "EOF"
section=driver
version=7.2
# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
packagedir=$(echo $package | sed 's/.tar.bz2//')
tar -xf $package
cd $packagedir
case $(basename "$PWD") in
xf86-input-evdev-[0-9]* | xf86-video-ati-[0-9]* | \
xf86-video-fbdev-[0-9]* | xf86-video-glint-[0-9]* | \
xf86-video-newport-[0-9]* )
sed -i -e "s/\xc3\xb8/\\\\[\/o]/" \
-e "s/\xc3\xa4/\\\\[:a]/" \
-e "s/\xc3\x9c/\\\\[:U]/" man/*.man
;;
esac &&
./configure $XORG_CONFIG \
--with-xorg-module-dir=$XORG_PREFIX/lib/X11/modules &&
make
make install
cd ..
rm -rf $packagedir
#rm -f $package
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop
EOF
 
chmod 755 build_driver.sh
 
Build and install :
time ./build_driver.sh
 
real    80m57.820s
user    10m41.884s
sys     66m48.138s
 
xterm-231
xterm is a terminal emulator for the X Window System.
‧ Download (FTP): ftp://invisible-island.net/xterm/xterm-231.tgz
‧ Download MD5 sum: b767d702e1464e16802b90c2187252c6
‧ Download size: 830 KB
‧ Estimated disk space required: 8.0 MB
‧ Estimated build time: 0.1 SBU
xterm Dependencies
Required
Xorg Libraries
Optional
luit-1.0.2 (required in non-UTF-8 locales if the user wants TrueType fonts, and always required in Chinese, Japanese, and Korean locales). Configuration instructions below assume that Luit is installed.
 
Unpack source :
cd /blfs/xc
tar xvf xterm-231.tgz
cd xterm-231
 
Build and install :
time {
sed -i '/v0/,+1s/new:/new:kb=^?:/' termcap &&
echo -e '\tkbs=\\177,' >>terminfo &&
TERMINFO=/usr/lib/terminfo ./configure $XORG_CONFIG \
--enable-luit --enable-wide-chars \
--with-app-defaults=$XORG_PREFIX/share/X11/app-defaults &&
make &&
make install &&
make install-ti ;
}
 
real    1m56.638s
user    0m18.561s
sys     1m19.729s
 
Clean up :
 
cd /blfs/xc
rm -rf xterm-231
 
Configuring xterm
There are two ways to configure xterm. You can add X resource definitions to the user's ~/ . Xresources file, or add them to the system-wide $XORG_ PREFIX/ share/ X11/ app- defaults/ Xterm file.

In order for xterm to follow the locale settings in the environment, use TrueType fonts, and follow the Linux convention about the code sent by the Backspace key, add the following definitions as the root user:
cat >> $XORG_PREFIX/share/X11/app-defaults/XTerm << "EOF"
*VT100*locale: true
*VT100*faceName: Monospace
*VT100*faceSize: 10
*backarrowKeyIsErase: true
*ptyInitialErase: true
EOF
 
 

Configuring The X Window System
 
1. Backwards compatiablity :
ln -vsf $XORG_PREFIX /usr/X11R6
 
2. Update the library linker's cache by adding /usr/X11R6/lib to /etc/ld.so.conf and running ldconfig.
 
Sample /etc/ld.so.conf
 
# Begin /etc/ld.so.conf
/usr/local/lib
/opt/lib
/usr/X11R6/lib
# End /etc/ld.so.conf
 
Run ldconfig :
ldconfig
 
3. Additionally, while still the root user, ensure /usr/X11R6/bin and /usr/X11R6/lib/pkgconfig are added to the PATH and PKG_CONFIG_PATH environment variables, respectively.  This can be done by editing the file /etc/profile
Sample :
 
# Begin /etc/profile
#export LANG=<ll>_<CC>.<charmap><@modifiers>
export LANG=en_US.utf8
export PATH=$PATH:/usr/X11R6/bin
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig
# End /etc/profile
 
4. As the root user create a basic X Window System configuration file with the following command:
cd ~ &&
Xorg -configure
 
The screen will go black and you may hear some clicking of the monitor. This command will create a file in your home directory, xorg.conf.new for Xorg, or XF86Config.new for XFree86.

5. Edit the newly created configuration file to suit your system. The details of the files are located in the xorg.conf.5x man page.
 
6. Test the system with the following command:
X -config ~/xorg.conf.new

You will only get a gray background with an X-shaped mouse cursor, but it confirms the system is working. Exit with Control+Alt+Backspace. If the system does not work, take a look at /var/log/Xorg.0.log to see what went wrong.

7. As the root user, create the configuration directory and move the configuration file to the new directory:
install -v -m644 -D ~/xorg.conf.new /etc/X11/xorg.conf

8. As the root user, create . xinitrc:
cat > ~/.xinitrc << "EOF"
# Begin .xinitrc file
xterm -g 80x40+0+0 &
xclock -g 100x100-0+0 &
twm
EOF

This provides an initial screen with a small clock that is managed by a simple window manager, Tab Window Manager. For details of twm, see the man page.
 
9. Add the file creation to /etc/sysconfig/createfiles that is sourced by the /etc/rc.d/init.d/cleanfs startup script.
cat >> /etc/sysconfig/createfiles << "EOF"
/tmp/.ICE-unix dir 1777 root root
EOF
 
Start X with:
startx
 
and a basic functional X Window System should be displayed.
 
 
End
Comments