[Solved] Building Qt 4.8.2 on Ubuntu



  • Hello everyone,
    I am trying to build Qt 4.8.2 from source on latest Ubuntu i386. I have run following commands:
    @
    ./configure -nomake tests -nomake demos -nomake examples -no-exceptions -nomake webkit -opensource
    make
    @
    But I keep getting following error:
    @
    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/gbinding.h:30,
    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 wtf/gobject/GOwnPtr.cpp:24:
    /usr/include/glib-2.0/glib/gthread.h:51:16: error: ‘union’ tag used in naming ‘struct _GMutex’ [-fpermissive]
    /usr/include/glib-2.0/glib/gthread.h:58:7: error: ‘union’ tag used in naming ‘struct _GMutex’ [-fpermissive]
    make[2]: *** [.obj/release-static/GOwnPtr.o] Error 1
    make[2]: Leaving directory /home/honza/qt-everywhere-opensource-src-4.8.2/src/3rdparty/webkit/Source/JavaScriptCore' make[1]: *** [sub-JavaScriptCore-JavaScriptCore-pro-make_default-ordered] Error 2 make[1]: Leaving directory/home/honza/qt-everywhere-opensource-src-4.8.2/src/3rdparty/webkit/Source'
    make: *** [sub-webkit-make_default-ordered] Error 2
    @
    Anybody can please help with this? Thanks in advance!



  • It seems the webkit code still refers to _GMutex as a union while, in glib-2.0, it is a struct.
    Try -no-webkit instead of -nomake webkit.

    "Reference...":http://www.qtforum.org/post/119235/error-union-tag-used-in-naming-struct-gmutex.html#post119235



  • Thanks, -no-webkit did the trick.
    Link to qtforum was helpfull as well. Thanks again!


  • Moderators

    https://codereview.qt-project.org/#change,25069 fixes the build for me.

    Unfortunately it is not really possible to apply this to Qt since it will break other systems.



  • Tobias, can you explain what do you mean with "it will break other systems"
    Will there be another solution to fix that problem?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.