FS#30563 - [qt] Broken designer in 4.8.2-2

Attached to Project: Arch Linux
Opened by Paul Gideon Dann (giddie) - Friday, 06 July 2012, 10:21 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 30 July 2012, 08:57 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Andrea Scarpino (BaSh)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Designer is broken because the Glib folks charged _GMutex from a struct to a union. See: http://www.qtforum.org/article/37809/error-union-tag-used-in-naming-struct-gmutex.html.

I'm attaching a patch.

Reproduce:

Run designer, get backtrace:
# designer
Warning: option --plugin-path no longer exists.
Warning: option --plugin-path no longer exists.
[0x24f8928] main services discovery error: no suitable services discovery
module
*** glibc detected *** designer: free(): invalid next size (fast):
0x00000000027bdc50 ***
======= Backtrace: =========
/lib/libc.so.6(+0x784a6)[0x7f25e3c494a6]
/usr/lib/libQtDesigner.so.4(_ZN18qdesigner_internal14WidgetDataBase21defaultPropertyValuesERK7QString+0x149)
[0x7f25e5d96789]
/usr/lib/libQtDesigner.so.4(_ZN18qdesigner_internal14WidgetDataBase25grabDefaultPropertyValuesEv+0x6c)
[0x7f25e5d96aec]
designer[0x42fc0f]
designer[0x429b2d]
designer[0x42a0e7]
designer[0x4168f3]
/lib/libc.so.6(__libc_start_main+0xf5)[0x7f25e3bf2725]
designer[0x4169b1]
...

Try to compile Qt, get:
compiling wtf/gobject/GRefPtr.cpp
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]
In file included from ./wtf/Platform.h:1217:0,
from ./config.h:30,
from wtf/gobject/GOwnPtr.cpp:19:
wtf/gobject/GTypedefs.h:55:16: note: ‘struct _GMutex’ was previously declared here
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:58:7: error: ‘union’ tag used in naming ‘struct _GMutex’ [-fpermissive]
In file included from ./wtf/Platform.h:1217:0,
from ./config.h:30,
from wtf/gobject/GOwnPtr.cpp:19:
wtf/gobject/GTypedefs.h:55:16: note: ‘struct _GMutex’ was previously declared here
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34:0,
from /usr/include/glib-2.0/glib.h:34,
from wtf/gobject/GRefPtr.cpp:24:
/usr/include/glib-2.0/glib/gthread.h:51:16: error: ‘union’ tag used in naming ‘struct _GMutex’ [-fpermissive]
In file included from ./wtf/Platform.h:1217:0,
from ./config.h:30,
from wtf/gobject/GRefPtr.cpp:19:
wtf/gobject/GTypedefs.h:55:16: note: ‘struct _GMutex’ was previously declared here
In file included from /usr/include/glib-2.0/glib/gasyncqueue.h:34:0,
from /usr/include/glib-2.0/glib.h:34,
from wtf/gobject/GRefPtr.cpp:24:
/usr/include/glib-2.0/glib/gthread.h:58:7: error: ‘union’ tag used in naming ‘struct _GMutex’ [-fpermissive]
In file included from ./wtf/Platform.h:1217:0,
from ./config.h:30,
from wtf/gobject/GRefPtr.cpp:19:
wtf/gobject/GTypedefs.h:55:16: note: ‘struct _GMutex’ was previously declared here
make[2]: *** [.obj/release-static/GOwnPtr.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [.obj/release-static/GRefPtr.o] Error 1
make[2]: Leaving directory `/home/dannpg/In/qt/src/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/dannpg/In/qt/src/qt-everywhere-opensource-src-4.8.2/src/3rdparty/webkit/Source'
This task depends upon

Closed by  Andrea Scarpino (BaSh)
Monday, 30 July 2012, 08:57 GMT
Reason for closing:  Not a bug
Additional comments about closing:  see comments
Comment by Andrea Scarpino (BaSh) - Friday, 06 July 2012, 11:50 GMT
How could I reproduce the crash? It doesn't crash here.
Comment by Paul Gideon Dann (giddie) - Friday, 06 July 2012, 11:58 GMT
Huh; that's strange. As I said above, I can reproduce the crash by simply running "designer" in a terminal. I'm not using [testing], but otherwise I'm up-to-date.
Comment by Andrea Scarpino (BaSh) - Friday, 06 July 2012, 11:59 GMT
Uhm. I'm using [testing] and [multilib] too.
Comment by Paul Gideon Dann (giddie) - Friday, 06 July 2012, 12:09 GMT
Yeah, I'm using [multilib] as well. I actually can't get through a full Qt build, even with the above patch, but someone on the mailing list suggested I build with extra-x86_64-build, which I haven't tried yet, because I didn't know about it :)
Comment by Paul Gideon Dann (giddie) - Friday, 06 July 2012, 12:10 GMT
To clarify, the above patch does fix the compiler error I reported above, but a different, unrelated error occurs later on in the build:

compiling helpviewer_qwv.cpp
helpviewer_qwv.cpp:168:1: error: expected class-name before ‘{’ token
helpviewer_qwv.cpp:173:13: error: ‘QWebPage’ does not name a type
helpviewer_qwv.cpp:174:32: error: ‘WebAction’ has not been declared
helpviewer_qwv.cpp:176:42: error: ‘QWebFrame’ has not been declared
helpviewer_qwv.cpp:177:41: error: ‘NavigationType’ has not been declared
helpviewer_qwv.cpp: In constructor ‘HelpPage::HelpPage(QObject*)’:
helpviewer_qwv.cpp:189:7: error: class ‘HelpPage’ does not have any field named ‘QWebPage’
helpviewer_qwv.cpp: At global scope:
helpviewer_qwv.cpp:197:1: error: ‘QWebPage’ does not name a type
helpviewer_qwv.cpp:207:30: error: variable or field ‘triggerAction’ declared void
helpviewer_qwv.cpp:207:30: error: ‘WebAction’ was not declared in this scope
helpviewer_qwv.cpp:207:48: error: expected primary-expression before ‘bool’
make[4]: *** [.obj/release-shared/helpviewer_qwv.o] Error 1
make[4]: Leaving directory `/home/dannpg/In/qt/src/qt-everywhere-opensource-src-4.8.2/tools/assistant/tools/assistant'
make[3]: *** [sub-assistant-make_default-ordered] Error 2
make[3]: Leaving directory `/home/dannpg/In/qt/src/qt-everywhere-opensource-src-4.8.2/tools/assistant/tools'
make[2]: *** [sub-tools-make_default-ordered] Error 2
make[2]: Leaving directory `/home/dannpg/In/qt/src/qt-everywhere-opensource-src-4.8.2/tools/assistant'
make[1]: *** [sub-assistant-make_default-ordered] Error 2
make[1]: Leaving directory `/home/dannpg/In/qt/src/qt-everywhere-opensource-src-4.8.2/tools'
make: *** [sub-tools-make_default-ordered] Error 2
Comment by Andrea Scarpino (BaSh) - Friday, 06 July 2012, 13:39 GMT
To fix the second build issue you've to remove the qtwebkit package from your system.
Comment by Paul Gideon Dann (giddie) - Saturday, 07 July 2012, 08:09 GMT
I got Qt building using extra-x86_64-build (+my patch). However, despite everything compiling OK, designer is still broken :(
Comment by Gregor (gregorburger) - Wednesday, 11 July 2012, 11:50 GMT
here is a patch from linuxfromscratch. I'm currently testing the patch.

Comment by Paul Gideon Dann (giddie) - Wednesday, 11 July 2012, 12:52 GMT
The patch looks good, and is more thorough than my patch. However, it doesn't fix my runtime issue with launching designer.
Comment by Gregor (gregorburger) - Wednesday, 11 July 2012, 13:05 GMT
could the problem be caused be the glibc 2.16 update?
Comment by Paul Gideon Dann (giddie) - Wednesday, 11 July 2012, 13:08 GMT
Yes, I'm pretty sure it is, but downgrading is not trivial.
Comment by Gregor (gregorburger) - Friday, 13 July 2012, 19:08 GMT
Do you have a NVIDIA card and the latest NVIDIA binary driver installed? My Laptop has
an intel card and I can't reproduce the crash. After compiling a debug package I found
that /usr/lib/libnvidia-tls.so.302.17 to be part of the backtrace.

Comment by Gregor (gregorburger) - Friday, 13 July 2012, 20:54 GMT
Ok, my problem was a really old qwt designer plugin hanging around in the plugin folder.
Removing that single so fixed my problem.
Comment by Paul Gideon Dann (giddie) - Monday, 16 July 2012, 11:50 GMT
I don't have an Nvidia card. It's an Intel HD3000 (on Sandybridge). I don't see anything named "qwt" in /usr/lib/qt/plugins that doesn't belong to the "qt" package...
Comment by Jelle van der Waa (jelly) - Saturday, 28 July 2012, 13:26 GMT
Status? Both my VM and main box run Designer flawlessly, do you have any plugins installed, maybe from AUR?
Comment by Paul Gideon Dann (giddie) - Monday, 30 July 2012, 08:56 GMT
Yes, you're absolutely right. It turns out the libqwt_designer_plugin.so plugin from qwt5 (AUR) is to blame. If I'd kept qgis up-to-date, I'd probably have caught this. Sorry!

Loading...