tags:

views:

383

answers:

2

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.

+1  A: 

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 rpm.pbone.net for example.

or

  • 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.
Troubadour
Welln I had found a link that explained how to fix it but the thing is that the OS seems to still be seing the old fontconfig even if I install a newer one, both fontconfigs seem to be there
yan bellavance
I followed these steps http://theitdepartment.wordpress.com/2009/03/15/centos-qt-fcfreetypequeryface/" and it did install. But the OS and qt still saw the old one, Why is that? I found a folder called cache that contains the old fontconfig so I am wondering if I should clear that cache and if I should uninstall the old one and if there are some environment variables still pointing to the old one.
yan bellavance
+1  A: 

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

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

Apparently libQtGui.so 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/libfontconfig.so.1'''

How to Fix

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

cd /usr/src
wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
tar -zxf fontconfig-2.4.2.tar.gz
cd fontconfig-2.4.2
./configure -prefix=/usr
make
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!

-Ed

Ed
thanks alot! this is what I needed
yan bellavance
@Ed: I'm a little confused. So you say you do not need to add the fontconfig lib location, but you still show the .pro modification right underneath. So do you need to add or not?
ShaChris23