Xorg Libraries

Introduction to Xorg Libraries

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

[Note]

Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

Package Information

  • Download (HTTP): https://www.x.org/pub/individual/lib/

  • Download size: 12 MB

  • Estimated disk space required: 274 MB (47 MB installed) - if source directories not deleted

  • Estimated build time: 1.8 SBU

Xorg Libraries Dependencies

Required

Fontconfig-2.17.1 and libxcb-1.17.0

Optional

asciidoc-10.2.1, xmlto-0.0.29 with one or more of the following: fop-2.11, Links-2.30, Lynx-2.9.2, ncompress (for some tests), and W3m (to generate additional PDF or text documentation for the libXfont package).

Recommended at runtime

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"
6ad67d4858814ac24e618b8072900664  xtrans-1.6.0.tar.xz
146d770e564812e00f97e0cbdce632b7  libX11-1.8.12.tar.xz
ea8149187a26e9df6dbd94a60b3d8da0  libXext-1.3.7.tar.xz
c5cc0942ed39c49b8fcd47a427bd4305  libFS-1.0.10.tar.xz
d1ffde0a07709654b20bada3f9abdd16  libICE-1.1.2.tar.xz
3aeeea05091db1c69e6f768e0950a431  libSM-1.2.6.tar.xz
ec09c90a1cfd2c0630321d366a5e7203  libXScrnSaver-1.2.5.tar.xz
9acd189c68750b5028cf120e53c68009  libXt-1.3.1.tar.xz
532a37254137e9e1827b8eec95e79adf  libXmu-1.3.0.tar.xz
d22b838e42ac0229ddf5a3afaf23910c  libXpm-3.5.18.tar.xz
2a9793533224f92ddad256492265dd82  libXaw-1.0.16.tar.xz
baa39ada682dd524491a165bb0dfc708  libXfixes-6.0.2.tar.xz
132816d5efccb883bbc2bf45eb905770  libXcomposite-0.4.7.tar.xz
4c54dce455d96e3bdee90823b0869f89  libXrender-0.9.12.tar.xz
5ce55e952ec2d84d9817169d5fdb7865  libXcursor-1.2.3.tar.xz
72bb73f2a07f81784ad69a39d7df1da2  libXdamage-1.1.7.tar.xz
8816cc44d06ebe42e85950b368185826  libfontenc-1.1.8.tar.xz
66e03e3405d923dfaf319d6f2b47e3da  libXfont2-2.0.7.tar.xz
d378be0fcbd1f689f9a132e0d642bc4b  libXft-2.3.9.tar.xz
95a960c1692a83cc551979f7ffe28cf4  libXi-1.8.2.tar.xz
5f3f5754a40730d1518233a60ba5c48e  libXinerama-1.1.6.tar.xz
b550dfa388292a821aecdd52acecc94c  libXrandr-1.5.5.tar.xz
5014282a08b54ec0edfa73c5cf9ae2c1  libXres-1.2.3.tar.xz
b62dc44d8e63a67bb10230d54c44dcb7  libXtst-1.2.5.tar.xz
8a26503185afcb1bbd2c65e43f775a67  libXv-1.0.13.tar.xz
de4227c5722a8f5ca5748f3ef524aeee  libXvMC-1.0.15.tar.xz
543164f1239fbe92cc0a9128d8da88e9  libXxf86dga-1.1.7.tar.xz
bea9e3707fae6c3275769e771006fa0f  libXxf86vm-1.1.7.tar.xz
57c7efbeceedefde006123a77a7bc825  libpciaccess-0.18.1.tar.xz
fa0faa5b6a8e726186c535d73712ccea  libxkbfile-1.2.0.tar.xz
9805be7e18f858bed9938542ed2905dc  libxshmfence-1.3.3.tar.xz
53b72ce969745f8d3e41175d6549ce0b  libXpresent-1.0.2.tar.xz
EOF

To download the needed files using Wget-1.25.0, 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.17p2 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*}
  echo "Building $packagedir"

  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]* )
      ./configure $XORG_CONFIG $docdir --disable-open-zfile
    ;;
  
    libpciaccess* | libxkbfile* )
      mkdir build
      cd    build
        meson setup --prefix=$XORG_PREFIX --buildtype=release ..
        ninja
        #ninja test
        as_root ninja install
      popd     # $packagedir
      continue # for loop
    ;;

    * )
      ./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

--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.29 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.11 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: 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, libXpresent.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.2, $XORG_PREFIX/share/doc/libSM-1.2.6, $XORG_PREFIX/share/doc/libX11-1.8.12, $XORG_PREFIX/share/doc/libXaw, $XORG_PREFIX/share/doc/libXext, $XORG_PREFIX/share/doc/libXi, $XORG_PREFIX/share/doc/libXmu-1.3.0, $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

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

libXpresent.so

is the library interface to the X Present Extension

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