This is on a dual athlon xp system with CFLAGS="-march=athlon-xp -mcpu=athlon-xp -O3 -pipe" and USE="3dnow alsa avi berkdb cdr crypt cups dga directFB doc dvd encode -esd evo fbcon gd gif gnome gphoto2 gtk2 gtkhtml -i18n imlib innodb java jikes jpeg kde libwww -maildir mbox mmx motif mozilla mpeg mysql ncurses -nls oggvorbis opengl oss -pam pdflib perl plotutils png qt quicktime readline ruby samba sdl slang slp socks5 spell ssl svga -tcpd tetex tiff truetype X xft xml xml2 xmms xv zlib" (but the CFLAGS does not seem to affect flags when compiling glibc, and I have tried with and without optimizations and with and without the debug flag wherever I can). I have had this problem for a month or two now. uic seg faults every time I try to compile qt: cd designer && make -f Makefile make[4]: Entering directory `/var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/tools/designer/designer' /var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/bin/uic -L /var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/plugins listboxeditor.ui -o listboxeditor.h /var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/bin/uic -L /var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/plugins editfunctions.ui -o editfunctions.h make[4]: *** [listboxeditor.h] Segmentation fault make[4]: *** Waiting for unfinished jobs.... make[4]: *** [editfunctions.h] Segmentation fault make[4]: Leaving directory `/var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/tools/designer/designer' make[3]: *** [sub-designer] Error 2 make[3]: Leaving directory `/var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/tools/designer' make[2]: *** [sub-designer] Error 2 make[2]: Leaving directory `/var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0/tools' make[1]: *** [sub-tools] Error 2 make[1]: Leaving directory `/var/tmp/portage/qt-3.1.0-r1/work/qt-x11-free-3.1.0' make: *** [init] Error 2 If I run uic in gdb, it seg faults in src/codecs/qtextcodec.cpp, in the source for QTextCodec::codecForLocale(), at the line: char *charset = nl_langinfo (CODESET); If I put a printf statement right before it to print out CODESET: printf("CODESET is %d\n", CODESET); I get a segmentation fault in _IO_vfprintf in glibc 2.3.1 at a very strange place. It seg faults while executing the line: int save_errno = errno; If I try to run mplayer right now, I get a segmentation fault in exactly the same place in _IO_vfprintf in glibc 2.3.1. My only guess here is that the stack is getting corrupted? Of course glibc won't let me compile it without any optimization, so the line reported as where the seg fault is actually happening might be completely bogus (I think?). It's definitely a messy problem, and I don't think I have the experience I'd need with any of gdb, glibc, or var-arg stuff to figure this one out any time soon (without help anyway).
looks more like a glibc issue to me than a qt issue, adding glibc devs to cc.
Tried to cut CFLAGS to "-march=athlon -O2 -pipe" (as well as CXXFLAGS), and remerge ? Also, what versions of glibc, gcc, and binutils do you have installed (with gentoolkit installed, do): # epm -q binutils gcc glibc
I should have followed up here. I did try cutting the CFLAGS all the way down to simply -O2 to no avail. I don't know what the problem is, but I was able to make it stop happening by removing the following from my .xinitrc file: export __GL_SINGLE_THREADED=1 I noticed by accident that if I ran uic from the console, it did not seg fault, and in fact it worked. Then finding the culprit in .xinitrc was not hard. I would guess that is a bug that needs to be sent upstream to the qt folks - if you can reproduce it by setting __GL_SINGLE_THREADED=1.
Confirmed: I just set __GL_SINGLE_THREADED=1 and uic segfaults on an empty tun (ie when simply running "uic"). More than that, any qt/kde app will segfault if run from such an environment! Needs to be polished up and sent upstream (and we need to check if it's fixed in qt 3.1.1.). First more info would be nice though, such as any known issues with that variable (maybe this is related to the nvidia drivers? I use them, do you?) Well, leaving this for slightly later.
Nope, its not fixed in qt-3.1.1. Richard, what opengl do you use? xfree's or nvidia ?
I use the NVidia libGL: /usr/lib/opengl/nvidia/lib/libGL.so.1.0.3123
Read the nvidia glx README. It's a known issue. They say it's fixed in their alternative TLS-enabled libraries. I'm told the reason we don't enable TLS support in glibc is that it makes things much slower. NPTL should fix that :-) Anyway since the bug is in nvidia's drivers, there's very little we can do :-( (It shouldn't even be specific to qt, you could probably find something else that had it if you looked hard enough) Please confirm analysis - do we who ahve this bug all use nvidia drivers?
yes, the same here too (using nvidia drivers)
Yes, I am using the nvidia driver as well. - richard
is an nvidia driver bug, we can't fix it (easy workaround, don't export __GL_SINGLE_THREADED=1)
re-resolving