How can I update fontconfig to a newer version in Red Hat 5.3?

I want to update fontconfig to a newer version but it seems that the OS is still finding the old fontconfig and I need the newer version to build qt. How do I make Red Hat 5.3 see the newer version? I do not know if this helps but when I did a search for fontconfig I found some files in a folder called cache. When I do yum update it tells me everything is up to date but that version is too old and is missing FcFreeTypeQueryFace. Just send me a comment if this is wrong site and ill change it.


If you get this error under RHEL or CentOS 5.x:

/home/esutton/qtsdk-2010.02/qt/lib/ undefined reference to `FcFreeTypeQueryFace'
collect2: ld returned 1 exit status

Apparently fails trying to use the libfontconfig `FcFreeTypeQueryFace' method. Prior to version 2.4.2 it either did not exist or perhaps the signature was changed in version 2.4.2. Not sure which, but an updated version needs to be installed to: '''/usr/lib/'''

How to Fix

Download sources and configure to install where it expects to find it:

cd /usr/src
tar -zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure -prefix=/usr
make install <- Run as root or use sudo

After doing this, you do not need to add the fontconfig library location to your Qt project’s .pro file.

LIBS += -L/opt/fontconfig-2.4.2/lib

This has worked for me on RHEL 5.3. I hope this helps!


You need to either

  • find an rpm, perhaps a non Red Hat specific one, with a more recent build of fontconfig and install that. Try for example.


  • alternatively, get the source and build and install it yourself. If there is software on your system that depends on the existing fontconfig rpm then you won't be able to uninstall the version yum has given you. If that's the case then don't bother with the install part of the build process, just build it and leave it where it is. Then you'll have to make sure that the path to your locally built version is the one used when compiling Qt. I'm not saying all that will work but that's what I'd aim to do myself if there was no rpm option.

Need Your Help

How to get the number of pages count on radgrid

c# radgrid

How can I get the number of pages in a RadGrid through code? I tried the following but it always returned 1, although there are 10 pages.

Sorting and categorise arraylist


I want to sort Arraylist based on the field 'code' like below and i want to add an additional record into the current arraylist with the value by total price of same code.