You are not logged in.

1

Tuesday, April 24th 2012, 3:44pm

error: 'union' tag used in naming 'struct _GMutex'

Hi all,

I've been trying to build Qt 4.8.0 from sources on CentOS 6.2 (x86_64).
I installed libffi-devel, glib 2.32.0 and gstreamer 0.10.36 before.
And I installed no other package.

When I did "make" command for Qt, I got errors as below:
> /usr/local/include/glib-2.0/glib/gthread.h:51: error: 'union' tag used in naming 'struct _GMutex'
> /usr/local/include/glib-2.0/glib/gthread.h:58: error: 'union' tag used in naming 'struct _GMutex'

How could I solve the problem?

2

Friday, June 8th 2012, 4:30am

This is a bit old so maybe you've figured it out before now, but the problem is that glib changed _GMutex from a struct to a union, and the WebKit code hasn't caught up.

grep in the Qt source code for _GMutex, and change any instances that you find from struct to union. The build went fine for me after I did that.


rfbrown@blah:~/projects/qt-everywhere-opensource-src-4.8.2$ grep -R -n _GMutex *
src/3rdparty/webkit/Source/JavaScriptCore/wtf/gobject/GTypedefs.h:55:typedef struct _GMutex GMutex;

src/3rdparty/javascriptcore/JavaScriptCore/wtf/Threading.h:92:typedef struct _GMutex GMutex;