relocation error: /usr/lib/libXft.so.2: undefined symbol: XRenderQuerySubpixelOrder
On upgrading a bunch of machines from woody to sarge, I found that on the main workstation box,
attempting to start any GTK application (eg. gimp) failed with the error:
gimp: relocation error: /usr/lib/libXft.so.2: undefined symbol: XRenderQuerySubpixelOrder
This was true both for Debianised applications (eg. gimp) and non-Debianised ones (eg. the latest
build of Firefox from mozilla.org).
Googling the error message revealed a stack of people who had come across this error in a variety
of different distributions - mostly non-Debian - and failed to fix it. The most helpful results
were a few Debian bug reports - such as
223686 and
245807 - and
this debian-x post, which
contained the recommendation:
This happens when people have unofficial versions of the XFree86 packages installed.
Unofficial versions of packages are not supported.
Please upgrade to XFree86 4.3.0-7, currently in Debian unstable (sid) and testing (sarge).
However, this did not seem to apply in my case. I had just done a dist-upgrade which had replaced
the ds2.0 woody backport of X 4.3.0 with the current sarge version of 4.3.0 - and that had caused
the problem to appear, not fixed it! I ensured that libxft2, libxrender1 and render-dev were the
latest sarge versions - no joy. I even downloaded the source for the sid versions of these
packages and for xorg 6.8.2, compiled them locally and installed them - still no joy.
After much arse-aching I discovered what was going wrong. At one stage the machine in question
had had a non-Debian version of X 4.2.0 installed on it. It turned out that there were still a few
shared libraries from this installation hanging around in /usr/X11R6, despite the several
upgrades with Debian X packages that had taken place since:
-rw-r--r-- 1 root root 25174 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/xlibi18n.so.2
-rw-r--r-- 1 root root 10828 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/xlcDef.so.2
-rw-r--r-- 1 root root 5976 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/xlcUTF8Load.so.2
-rw-r--r-- 1 root root 5192 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/xlocale.so.2
-rw-r--r-- 1 root root 136101 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/ximcp.so.2
-rw-r--r-- 1 root root 44184 Mar 13 2003 /usr/X11R6/lib/X11/locale/common/xomGeneric.so.2
-rwxr-xr-x 1 root root 21404 Mar 13 2003 /usr/X11R6/lib/libXrender.so.1.1
-rwxr-xr-x 1 root root 1365010 Mar 13 2003 /usr/X11R6/lib/libOSMesa.so.3.3
-rwxr-xr-x 1 root root 10850 Mar 13 2003 /usr/X11R6/lib/libXrandr.so.1.0
It would seem that that old libXrender library was managing to screw things up, despite the
presence of the most recent version as well... I deleted all these old files and ran ldconfig, and
the problem was solved.
I would hazard a guess that the other people who had been having this problem could solve it by
the same method - searching for superseded shared libraries hanging around from previous X
installations and deleting them.
Since fixing this problem :-) I have discovered how to simplify the
checking... running "ldd foo"
where foo is the name of the library in the "undefined symbol" error message prints out a list of
all the other libraries the failing one is supposed to link with. It is then a relatively simple
matter to check that all the files listed are in fact the correct versions from the correct
dependency and not some older version that's still hanging around for whatever reason. I have just
used this method to successfully resolve a similar problem with relocation errors preventing KDE
apps from starting, which turned out to be due to old non-Debian libqt3 files in /usr/local/lib.
Back to sarge page
Back to Pigeon's Nest
Be kind to pigeons