Linux HOWTOs

About | Home | Search


HOWTO: libxcb
Description: X protocol C language binding
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# libxcb
# ======
# This covers installation of xcb-proto and libxcb

# The previous version of this howto installed it in the default
# location under the /usr/local prefix.  We now install it under
# /usr to avoid problems with libtool and other apps that linked
# to it in the previous location.

# If you want to uninstall either of them, cd into the source directory
# and run "make uninstall" as root.


# xcb-proto 1.1
# =============
# Prerequisites:
# libxml

cd
test -f installed/xcb-proto-1.1.tar.bz2 &&
 mv installed/xcb-proto-1.1.tar.bz2 .
test ! -f xcb-proto-1.1.tar.bz2 &&
 wget http://xcb.freedesktop.org/dist/xcb-proto-1.1.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "xcb-proto-*" -exec rm -r {} \;
tar xjvf ~/xcb-proto-1.1.tar.bz2
cd xcb-proto-1.1
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make

# Become root to install it
su

make install

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/xcb-proto-*.tar.*
mv xcb-proto-1.1.tar.bz2 installed/


# libxcb 1.1
# ==========
# Prerequisites:
# pkg-config
# Check >= 0.94
# libxslt
# doxygen
# xcb-proto >= 1.1 (above)
#
## On the Slackware 11.0-based machine that I installed this on, I installed
## the following packages from linuxpackages.net to spare myself
## the enjoyment of installing these "manually":
# xproto
# libXau
# libpthread-stubs
##
## Slackware 12.0 has packages for all of them

cd
test -f installed/libxcb-1.1.tar.bz2 &&
 mv installed/libxcb-1.1.tar.bz2 .
test ! -f libxcb-1.1.tar.bz2 &&
 wget http://xcb.freedesktop.org/dist/libxcb-1.1.tar.bz2
mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "libxcb-*" -exec rm -r {} \;
tar xjvf ~/libxcb-1.1.tar.bz2
cd libxcb-1.1
test $UID = 0 && chown -R root:root .
./configure --prefix=/usr
make

# Become root to install it
su

# Remove the Slackware package, if there is one
test -x /sbin/removepkg && /sbin/removepkg libxcb

# Remove old library files, install it
( cd /usr/local/lib ; rm -f libxcb.* libxcb-* )
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $USER .
chmod -R u+w .

# Become yourself again
exit

cd
mkdir -p -m 0700 installed
rm -f installed/libxcb-*.tar.*
mv libxcb-1.1.tar.bz2 installed/


# If you ever want to uninstall xcb-proto and libxcb, this should do it:
cd
su
test -d src/xcb-proto-* && ( cd src/xcb-proto-* ; make uninstall )
test -d src/libxcb-* && ( cd src/libxcb-* ; make uninstall )
for pfx in /usr /usr/local;
do
  test -d ${pfx}/share/xcb && rm -r ${pfx}/share/xcb
  rm -f ${pfx}/lib/pkgconfig/xcb-proto.pc
  test -d ${pfx}/include/xcb && rm -r ${pfx}/include/xcb
  ( cd ${pfx}/lib ; rm -f libxcb.* libxcb-* )
  ( cd ${pfx}/lib/pkgconfig ; rm -f xcb.pc xcb-*.pc )
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "xcb-proto-*" -exec rm -r {} \;
find ~/src -maxdepth 1 -type d -name "libxcb-*" -exec rm -r {} \;
rm -f ~/installed/libxcb-*.tar.* ~/installed/xcb-proto-*.tar.*

Back to the list


Last updated: Wed, 29 Apr 2020 22:04:50 -0400
Jason Englander <jason at englanders dot us>