Xorg Libraries

Introduction to Xorg Libraries

The Xorg libraries provide library routines that are used within all X Window applications.

This package is known to build and work properly using an LFS 11.3 platform.

Package Information

Xorg Libraries Dependencies

Required

Fontconfig-2.14.2 and libxcb-1.15

Optional

asciidoc-10.2.0, xmlto-0.0.28 with one or more of the following: fop-2.8, Links-2.28, Lynx-2.8.9rel.1, ncompress (for some tests), and W3m (to generate additional PDF or text documentation for the libXfont package).

Recommended at runtime

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/Xorg7Libraries

Downloading Xorg Libraries

First, create a list of files to be downloaded. This file will also be used to verify the integrity of the downloads when complete:

cat > lib-7.md5 << "EOF"
ce2fb8100c6647ee81451ebe388b17ad  xtrans-1.4.0.tar.bz2
e932752126240f0846b35eef6b1f2c3d  libX11-1.8.4.tar.xz
964942427fcc5a9fa0539661421857c8  libXext-1.3.5.tar.xz
742863a552ecd53cdb957b7b276213cc  libFS-1.0.9.tar.xz
b444a0e4c2163d1bbc7b046c3653eb8d  libICE-1.1.1.tar.xz
ffa434ed96ccae45533b3d653300730e  libSM-1.2.4.tar.xz
e613751d38e13aa0d0fd8e0149cec057  libXScrnSaver-1.2.4.tar.xz
b122ff9a7ec70c94dbbfd814899fffa5  libXt-1.2.1.tar.bz2
ed52d396115fbc4d05300762aab79685  libXmu-1.1.4.tar.xz
b3c58c94e284fd6940d3615e660a0007  libXpm-3.5.15.tar.xz
c1ce21c296bbf3da3e30cf651649563e  libXaw-1.0.14.tar.bz2
86f182f487f4f54684ef6b142096bb0f  libXfixes-6.0.0.tar.bz2
af0a5f0abb5b55f8411cd738cf0e5259  libXcomposite-0.4.6.tar.xz
ebf7fb3241ec03e8a3b2af72f03b4631  libXrender-0.9.11.tar.xz
4cdd1886fe5cce6f68554296edb46db8  libXcursor-1.2.1.tar.xz
ca55d29fa0a8b5c4a89f609a7952ebf8  libXdamage-1.1.6.tar.xz
6d3f1b15bb5b0bb71ae9f0a5103c1fc4  libfontenc-1.1.7.tar.xz
c179daa707f5f432f1bc13977e5bb329  libXfont2-2.0.6.tar.xz
69dc24ba444a0f6bd99423dbf8fd0260  libXft-2.3.7.tar.xz
74055672a111a98ce2841d2ec4057b05  libXi-1.8.tar.bz2
228c877558c265d2f63c56a03f7d3f21  libXinerama-1.1.5.tar.xz
850cbc7c921c9d5d0135734b114ff6ac  libXrandr-1.5.3.tar.xz
66c9e9e01b0b53052bb1d02ebf8d7040  libXres-1.2.2.tar.xz
02f128fbf809aa9c50d6e54c8e57cb2e  libXtst-1.2.4.tar.xz
70bfdd14ca1a563c218794413f0c1f42  libXv-1.0.12.tar.xz
11a358e7229fa28dc9801c1e64fe2e18  libXvMC-1.0.13.tar.xz
74d1acf93b83abeb0954824da0ec400b  libXxf86dga-1.1.6.tar.xz
5b913dac587f2de17a02e17f9a44a75f  libXxf86vm-1.1.5.tar.xz
d2f1f0ec68ac3932dd7f1d9aa0a7a11c  libdmx-1.1.4.tar.bz2
1466cf950c914ad2db1dbb76c9a724db  libpciaccess-0.17.tar.xz
8af2275955d40166bb647b14e4896ab1  libxkbfile-1.1.2.tar.xz
faa74f7483074ce7d4349e6bdc237497  libxshmfence-1.3.2.tar.xz
EOF

To download the needed files using wget, use the following commands:

mkdir lib &&
cd lib &&
grep -v '^#' ../lib-7.md5 | awk '{print $2}' | wget -i- -c \
    -B https://www.x.org/pub/individual/lib/ &&
md5sum -c ../lib-7.md5

Installation of Xorg Libraries

[Note]

Note

When installing multiple packages in a script, the installation needs to be done as the root user. There are three general options that can be used to do this:

  1. Run the entire script as the root user (not recommended).

  2. Use the sudo command from the Sudo-1.9.13p1 package.

  3. Use su -c "command arguments" (quotes required) which will ask for the root password for every iteration of the loop.

One way to handle this situation is to create a short bash function that automatically selects the appropriate method. Once the command is set in the environment, it does not need to be set again.

as_root()
{
  if   [ $EUID = 0 ];        then $*
  elif [ -x /usr/bin/sudo ]; then sudo $*
  else                            su -c \\"$*\\"
  fi
}

export -f as_root

Some libraries come with a test suite. If you wish to execute them, either comment out the rm -rf ... below, so that, after all libraries are installed, you can come back to the corresponding directory and run make check, or do individual builds, running the tests for each of those distributed with working test suites. Alternatively, you can uncomment the line #make check ..., and at the end, check the test results with:

grep -A9 summary *make_check.log

BLFS developers have confirmed that libX11, libXt, libXmu, libXpm, and libxshmfence are distributed with working test suites.

First, start a subshell that will exit on error:

bash -e

Install all of the packages by running the following commands:

for package in $(grep -v '^#' ../lib-7.md5 | awk '{print $2}')
do
  packagedir=${package%.tar.?z*}
  tar -xf $package
  pushd $packagedir
  docdir="--docdir=$XORG_PREFIX/share/doc/$packagedir"
  case $packagedir in
    libXfont2-[0-9]* )
      ./configure $XORG_CONFIG $docdir --disable-devel-docs
    ;;

    libXt-[0-9]* )
      ./configure $XORG_CONFIG $docdir \
                  --with-appdefaultdir=/etc/X11/app-defaults
    ;;

    libXpm-[0-9]* )
      sed -i '/TestAll.*TRUE/s|^|//|' test/TestAllFiles.h
      ./configure $XORG_CONFIG $docdir --disable-open-zfile
    ;;
    
    * )
      ./configure $XORG_CONFIG $docdir
    ;;
  esac

  make
  #make check 2>&1 | tee ../$packagedir-make_check.log
  as_root make install
  popd
  rm -rf $packagedir
  as_root /sbin/ldconfig
done

Finally, exit the shell that was started earlier:

exit

Command Explanations

sed ... test/TestAllFiles.h: Fix a test file to work without the optional compress program.

--disable-open-zfile: Allow libXpm to build without the optional compress command present.

--disable-devel-docs: Disable generation of text documentation in the libXfont2 package if xmlto-0.0.28 is installed without a text browser. Omit this parameter (or the entire case statement) if a text browser is installed.

--with-fop: Use fop-2.8 to generate PDF documentation (only for the libXfont package).

Configuration of Xorg Libraries

If you've chosen to install Xorg into /usr, then no further configuration is necessary and you can skip the rest of this section. If you've opted for an alternate prefix, you should create two symlinks to satisfy the expected environment of several packages. Execute the following commands as the root user:

ln -sv $XORG_PREFIX/lib/X11 /usr/lib/X11 &&
ln -sv $XORG_PREFIX/include/X11 /usr/include/X11

Contents

Installed Programs: cxpm and sxpm
Installed Libraries: libdmx.so, libfontenc.so, libFS.so, libICE.so, libpciaccess.so, libSM.so, libX11.so, libX11-xcb, libXaw6.so, libXaw7.so, libXaw.so, libXcomposite.so, libXcursor.so, libXdamage.so, libXext.so, libXfixes.so, libXfont2.so, libXft.so, libXinerama.so, libXi.so, libxkbfile.so, libXmu.so, libXmuu.so, libXpm.so, libXrandr.so, libXrender.so, libXRes.so, libxshmfence.so, libXss.so, libXt.so, libXtst.so, libXvMC.so, libXvMCW.so, libXv.so, libXxf86dga.so and libXxf86vm.so
Installed Directories: $XORG_PREFIX/include/X11/fonts, $XORG_PREFIX/include/X11/ICE, $XORG_PREFIX/include/X11/SM, $XORG_PREFIX/include/X11/Xmu, $XORG_PREFIX/include/X11/Xtrans, $XORG_PREFIX/share/doc/libFS, $XORG_PREFIX/share/doc/libICE-1.1.1, $XORG_PREFIX/share/doc/libSM-1.2.4, $XORG_PREFIX/share/doc/libX11-1.8.4, $XORG_PREFIX/share/doc/libXaw, $XORG_PREFIX/share/doc/libXext, $XORG_PREFIX/share/doc/libXi, $XORG_PREFIX/share/doc/libXmu-1.1.4, $XORG_PREFIX/share/doc/libXrender, $XORG_PREFIX/share/doc/libXt, $XORG_PREFIX/share/doc/libXtst, $XORG_PREFIX/share/doc/libXvMC, $XORG_PREFIX/share/doc/xtrans and $XORG_PREFIX/share/X11/locale

Short Descriptions

cxpm

checks the format of an XPM file

sxpm

shows an XPM file and/or converts XPM 1 or 2 files to XPM 3

libdmx.so

is the X Window System DMX (Distributed Multihead X) extension library

libfontenc.so

is the X11 font encoding library

libFS.so

is the library interface to the X Font Server

libICE.so

is the X Inter Client Exchange Library

libpciaccess.so

is the generic PCI Access library for X

libSM.so

is the X Session Management Library

libX11.so

is the Xlib Library

libXaw6.so

is the X Athena Widgets Library, version 6

libXaw7.so

is the X Athena Widgets Library, version 7

libXaw.so

are symbolic links to the current X Athena Widgets Library, version 7

libXcomposite.so

is the X Composite Library

libXcursor.so

is the X Cursor management library

libXdamage.so

is the X Damage Library

libXext.so

is the Misc X Extension Library

libXfixes.so

provides augmented versions of core protocol requests

libXfont2.so

is the X font library

libXft.so

is the X FreeType interface library

libXinerama.so

is the Xinerama Library

libXi.so

is the X Input Extension Library

libxkbfile.so

is the xkbfile Library

libXmu.so

is the X interface library for miscellaneous utilities not part of the Xlib standard

libXmuu.so

is the Mini Xmu Library

libXpm.so

is the X Pixmap Library

libXrandr.so

is the X Resize, Rotate and Reflection extension library

libXrender.so

is the X Render Library

libXRes.so

is the X-Resource extension client library

libxshmfence.so

exposes an event API on top of Linux futexes

libXss.so

is the X11 Screen Saver extension client library

libXt.so

is the X Toolkit Library

libXtst.so

is the Xtst Library

libXvMC.so

is the X-Video Motion Compensation Library

libXvMCW.so

is the XvMC Wrapper including the Nonstandard VLD extension

libXv.so

is the X Window System video extension library

libXxf86dga.so

is the client library for the XFree86-DGA extension

libXxf86vm.so

is the client library for the XFree86-VidMode X extension