Results 1 to 8 of 8

Thread: [CentOs 5.2] How fix libQtGui.so undefined reference FcFreeTypeQueryFace?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Mar 2009
    Posts
    14
    Thanked 2 Times in 2 Posts

    Default Re: [CentOs 5.2] How fix libQtGui.so undefined reference FcFreeTypeQueryFace?

    Use an anonymous browser to defeat the evil IT Overlords.
    http://www.the-cloak.com

    Copied from:
    http://theitdepartment.wordpress.com/2009/03/

    Archive for March, 2009
    CentOS 5.2 + Qt 4.5 + FcFreeTypeQueryFace


    Posted by theitdepartment on March 15, 2009

    So with all the buzz around the new release of Qt 4.5, you may be like me and have been desperately wanting to give it a whirl. Has this happened to you yet?

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

    Someone’s got some ’splainin to do. Lucky for you, that’s me. Basically, the people at fontconfig did not add this API call until 2.4.2. From fontconfig’s ChangeLog 2.4.2:

    commit 72ffe6536a6825a32095c8185aff836a12326ac5
    Author: Keith Packard
    Date: Sat Dec 2 13:22:27 2006 -0800

    Add FcFreeTypeQueryFace external API. Bug #7311.

    Expose ability to build an FcPattern directly from an FT_Face
    object.

    configure.in | 4 ++--
    doc/fcfreetype.fncs | 17 +++++++++++++++-
    fontconfig/fcfreetype.h | 6 ++++++
    src/fcfreetype.c | 50 ++++++++++++++++++++++++++---------------------
    4 files changed, 52 insertions(+), 25 deletions(-)

    Problem is for us CentOS 5.2 users, we’re given a version 2.4.1-7 from “upstream” It’s not a big deal, we can just compile fontconfig from source … wait, did I just say compile? No worries, it’s easy.

    1. Compile fontconfig 2.4.2 from source

    Note: Throughout this step, I used fontconfig 2.4.2 since this is the minimum required version, but I tested this with the latest version 2.6.0 so just replace the version numbers accordingly if you choose to use 2.6.0.

    [user@localhost ~]$ cd /usr/src
    [user@localhost /usr/src]$ wget http://fontconfig.org/release/fontconfig-2.4.2.tar.gz
    [user@localhost /usr/src]$ tar -zxf fontconfig-2.4.2.tar.gz
    [user@localhost /usr/src]$ cd fontconfig-2.4.2
    [user@localhost /usr/src/fontconfig-2.4.2]$ ./configure –prefix=/opt/fontconfig-2.4.2
    … (note: ‘configure’ output omitted for brevity) …
    [user@localhost /usr/src/fontconfig-2.4.2]$ make
    … (note: ‘make’ output omitted for brevity) …
    [user@localhost /usr/src/fontconfig-2.4.2]$ make install
    … (note: ‘make install’ output omitted for brevity) …

    Note: I chose to install into /opt/fontconfig-2.4.2 since I like keeping my “deviations” from upstream organized.

    2. Add the fontconfig library location to your project’s .pro file

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

    3. Recompile and that’s it! 8-)

    Now I can’t guarantee you will not have any ‘make’ errors due to library dependencies but I’m pretty sure that if you got as far as you did to receive this error, you will have every *-devel package needed by fontconfig already installed on your system.

  2. The following user says thank you to esutton for this useful post:

    perden (30th March 2009)

Similar Threads

  1. Unable to install QT 4.4.0 from sources
    By debnathm in forum Installation and Deployment
    Replies: 4
    Last Post: 6th August 2008, 06:43
  2. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  3. MS Sql native driver??
    By LordQt in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2007, 13:41
  4. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 14:28
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.