When I try to upgrade qt to qt-3.2.1-r1 I get a g++ Internal error while compiling: g++ -c -pipe -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_IN TERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -D QT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/var/tmp/porta ge/qt-3.2.1-r1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freet ype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/relea se-shared-mt/ -o ./propertyeditor.o propertyeditor.cpp g++ -c -pipe -fno-exceptions -fPIC -Wall -W -O2 -D_REENTRANT -DDESIGNER -DQT_IN TERNAL_XML -DQT_INTERNAL_WORKSPACE -DQT_INTERNAL_ICONVIEW -DQT_INTERNAL_TABLE -D QT_TABLET_SUPPORT -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DQT_SHARED -I/var/tmp/porta ge/qt-3.2.1-r1/work/qt-x11-free-3.2.1/mkspecs/linux-g++ -I. -I/usr/include/freet ype2 -I../shared -I../uilib -I../../../include -I/usr/X11R6/include -I.moc/relea se-shared-mt/ -o ./resource.o resource.cpp g++: Internal error: Terminated (program cc1plus) Please submit a full bug report. See <URL:http://bugs.gentoo.org/> for instructions. make[3]: *** [formwindow.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/qt-3.2.1-r1/work/qt-x11-free-3.2.1/ tools/designer/designer' make[2]: *** [sub-designer] Error 2 make[2]: Leaving directory `/var/tmp/portage/qt-3.2.1-r1/work/qt-x11-free-3.2.1/ tools/designer' make[1]: *** [sub-designer] Error 2 make[1]: Leaving directory `/var/tmp/portage/qt-3.2.1-r1/work/qt-x11-free-3.2.1/ tools' make: *** [sub-tools] Error 2 !!! ERROR: x11-libs/qt-3.2.1-r1 failed. !!! Function src_compile, Line 128, Exitcode 2 !!! (no error message) emerge info Portage 2.0.49-r5 (default-x86-1.4, gcc-3.3.1, glibc-2.3.2-r1, 2.6.0-test5-bk4) ================================================================= System uname: 2.6.0-test5-bk4 i686 AMD Athlon(tm) XP 1800+ distcc 2.10 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.2 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=athlon-xp -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox ccache autoaddcvs" GENTOO_MIRRORS="http://ds.thn.htu.se/linux/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage.local" SYNC="rsync://rsync1.se.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt encode foomaticdb gif jpeg libg++ mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib directfb alsa gdbm berkdb slang readline tetex aalib svga tcltk java guile X sdl tcpd pam libwww ssl perl python imlib oggvorbis gtk qt motif opengl mozilla cdr aavm dga gtk2 vim-with-x xinerama -cups -kde -arts -gpm -esd -gnome" Reproducible: Always Steps to Reproduce: 1. emerge -u qt I'm using the 2.6.0-test5 kernel.
I changed my CFLAGS to "-march=athlon-xp -O2" and the compilation succeded. I've had the old CFLAGS (-march=athlon-xp -O3 -pipe" for about 5 months without problems.
I'm going to re-assign this to the KDE people to close. As per Comment #1, qt apparently doesn't like the -O3 optimization flag, so I recommend the addition of a replace-flags command in src_compile() in the ebuild to replace -O3 with -O2 so the compile can complete.
Well, this solves the problem with qt. What it doesn't solve is the fact that it say: "g++: Internal error: Terminated (program cc1plus)". If g++ doesn't like qt it should emit an error, that's ok, but should it really end with an internal error. To me, at least, this is an indication of something wrong?
Note that this may be a resource starvation problem. I had the exact same error when installing qt-3.2.1-r2, and that was due to lack of memory. I had a rogue xterm that had eaten up all my swapspace, and when I tried to emerge qt it died at some random file because g++ self-terminated due to what appeared to be lack of memory. So morale is, make sure you have enough memory if you come across this problem.
closing as fixed. Will look into flag replacement.