Results 1 to 2 of 2

Thread: Qt 5.4.2 build problem on Ubuntu 14.04

  1. #1
    Join Date
    Nov 2008
    Posts
    16
    Thanks
    2
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Qt 5.4.2 build problem on Ubuntu 14.04

    When building Qt 5.4.2 on Ubuntu 14.04, I'm getting a build error around glib. Here is the error

    make[7]: Entering directory `/x/sorgius/qt/5.4.2/.build/x86-linux-ubuntu-14.04-prefix/src/x86-linux-ubuntu-14.04-build/qtwebkit/Source/WTF'
    make[7]: Warning: File `Makefile.WTF' has modification time 0.19 s in the future
    In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34:0,
    from /usr/include/glib-2.0/glib.h:34,
    from /usr/include/glib-2.0/gobject/gtype.h:26,
    from /usr/include/glib-2.0/gobject/gboxed.h:26,
    from /usr/include/glib-2.0/glib-object.h:25,
    from /usr/include/glib-2.0/gio/gioenums.h:30,
    from /usr/include/glib-2.0/gio/giotypes.h:30,
    from /usr/include/glib-2.0/gio/gio.h:28,
    from /x/sorgius/qt/5.4.2/.build/x86-linux-ubuntu-14.04-prefix/src/x86-linux-ubuntu-14.04/qtwebkit/Source/WTF/wtf/gobject/GOwnPtr.cpp:24:
    /usr/include/glib-2.0/glib/gthread.h:246:27: error: variable or field ‘g_static_mutex_init’ declared void
    void g_static_mutex_init (GStaticMutex *mutex);
    ^
    /usr/include/glib-2.0/glib/gthread.h:246:27: error: ‘GStaticMutex’ was not declared in this scope
    /usr/include/glib-2.0/glib/gthread.h:246:41: error: ‘mutex’ was not declared in this scope
    void g_static_mutex_init (GStaticMutex *mutex);
    ^
    /usr/include/glib-2.0/glib/gthread.h:247:27: error: variable or field ‘g_static_mutex_free’ declared void
    void g_static_mutex_free (GStaticMutex *mutex);
    ^
    /usr/include/glib-2.0/glib/gthread.h:247:27: error: ‘GStaticMutex’ was not declared in this scope
    /usr/include/glib-2.0/glib/gthread.h:247:41: error: ‘mutex’ was not declared in this scope
    void g_static_mutex_free (GStaticMutex *mutex);
    ^
    /usr/include/glib-2.0/glib/gthread.h:266:3: error: ‘GStaticMutex’ does not name a type
    GStaticMutex mutex;
    ^
    /usr/include/glib-2.0/glib/gthread.h:268:3: error: ‘GSystemThread’ does not name a type
    GSystemThread owner;
    ^
    /usr/include/glib-2.0/glib/gthread.h:285:3: error: ‘GStaticMutex’ does not name a type
    GStaticMutex mutex;
    ^
    make[7]: *** [.obj/wtf/gobject/GOwnPtr.o] Error 1




    Here was my configure:

    /qt/5.4.2/.build/x86-linux-ubuntu-14.04-prefix/src/x86-linux-ubuntu-14.04/qtbase/configure -top-level -prefix /opt/external/qt/qt_5.4.2-gvr1/x86-linux-ubuntu-14.04 -release -opensource -confirm-license -nomake examples -qt-xcb -I /opt/external/icu/icu_52.1/x86-linux-ubuntu-14.04/include -L /opt/external/icu/icu_52.1/x86-linux-ubuntu-14.04/lib -I /opt/external/openssl/openssl_1.0.1m/x86-linux-ubuntu-14.04/include -L /opt/external/openssl/openssl_1.0.1m/x86-linux-ubuntu-14.04/lib


    And I know that it is on the system in /usr/lib/glib-2.0/include. I tried adding -I /usr/lib/glib-2.0/include to the configure command, but it then died earlier in the build with the same error :-\ Any ideas?

    psbs15:/usr/lib/glib-2.0/include$ grep -R GStaticMutex *
    typedef struct _GMutex* GStaticMutex;

  2. #2
    Join Date
    Nov 2008
    Posts
    16
    Thanks
    2
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Qt 5.4.2 build problem on Ubuntu 14.04

    Fixed! In case anyone else happens upon this, but you probably won't...

    Our 14.04 build server somehow had glib2.0 version 2.40.2 installed on it, but it had header files from 2.20 in /usr/include/glib-2.0/glib somehow (including gthread.h which tried to use GStaticMutex which does not exist anymore in 2.40.2... it was deprecated).

    Re-installed glib2.0-dev and the error went away.

Similar Threads

  1. Problem after build process with ubuntu
    By zlatan14 in forum General Programming
    Replies: 1
    Last Post: 2nd July 2014, 14:22
  2. Build qt3D with qt4 under Ubuntu 12.10
    By jiapei100 in forum Qt Tools
    Replies: 2
    Last Post: 23rd February 2013, 11:01
  3. Build 32-bit Qt on 64-bit Ubuntu 10.04 LTS
    By oleg_stepanenko@bk.ru in forum Installation and Deployment
    Replies: 1
    Last Post: 26th March 2012, 19:45
  4. Build QT Embedded Linux Ubuntu Error ?
    By Thành Viên Mới in forum Installation and Deployment
    Replies: 0
    Last Post: 4th November 2010, 04:15
  5. QT4 build debian/ubuntu package 4.2
    By patrik08 in forum Installation and Deployment
    Replies: 3
    Last Post: 21st September 2006, 08:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.