PDA

View Full Version : Qt 5.4.2 build problem on Ubuntu 14.04



TTGator
2nd October 2015, 21:19
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;

TTGator
29th October 2015, 14:08
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.