Gentoo Logo

Gentoo libxcb 1.4 Upgrade Guide

Content:

1.  Upgrading to libxcb 1.4

Code Listing 1.1: Updating xcb packages

# emerge -1av x11-proto/xcb-proto x11-libs/libxcb
# emerge -1av x11-proto/xproto x11-proto/xextproto x11-libs/libX11 x11-libs/libXext

You now have all the needed packages with support for the new libxcb.

2.  Fixing broken libtool archives

While the update may be over and your system may still work, emerging new packages or updates might yield a few unpleasant surprises, due to libtool's infamous archives : .la files.

The problem is that until recently, libX11 used a private libxcb library called libxcb-xlib.so, created specifically for libX11. While that is no problem in itself, this tiny library polluted (almost) every single .la file on your system. That's how libtool works.

But this is now turning into a problem since newer versions of libxcb no longer ship this library (and libX11 was fixed accordingly, of course). We now need to get rid of all references to this library within .la files.

To do so, just run /usr/portage/x11-libs/libxcb/files/xcb-rebuilder.sh to fix all .la files on your system.

The tool will also report whether shared libraries (.so files, usually located in /lib and /usr/lib) still reference the now defunct library. If the tool reports broken packages, please read on. If not, lucky you, your system is ready to go :)

3.  Fixing "broken" shared libraries

To avoid completely breaking users' system, we decided to keep libxcb-xlib.so so that you get the chance to fix your system at your own pace. If you've followed the above instructions, your system should now work properly, both at build-time and run-time.

But before you can remove libxcb-xlib.so, you will need to rebuild a few packages. If you do not rebuild them, removing the old library will break your system.

Run the following one liner to rebuild a simple, yet effective, subset of potentially broken packages. Do not worry, packages you don't have installed will not be installed.

Code Listing 3.1: Rebuilding essential packages first

# emerge --oneshot \
$(for i in x11-proto/ x11-libs/libxcb x11-libs/libX11 x11-libs/libXext \
           x11-libs/libX x11-libs/xcb-util x11-libs/cairo \
           x11-libs/pango x11-libs/gtk\\+ \
           x11-libs/qt-gui; do \
    qlist -IC $i; \
done) -av

Once this is done, you can use revdep-rebuild (from app-portage/gentoolkit) to finish fixing the rest of your system.

Code Listing 3.2: Rebuilding the remaining broken packages

# revdep-rebuild -L libxcb-xlib.so.0

When revdep-rebuild no longer reports broken packages, you can safely remove libxcb-xlib.so.0 from your library directory.

Code Listing 3.3: Removing the now unused libraries

# rm -i /usr/lib/libxcb-xlib.so*


Print

Page updated September 12, 2009

Summary: This guide shows how to upgrade from libxcb 1.1.90.2 and earlier to libxcb 1.4.

Remi Cardona
Author

Donate to support our development efforts.

Copyright 2001-2014 Gentoo Foundation, Inc. Questions, Comments? Contact us.