I get a configure error when trying "emerge kde": configure: error: "no known STL type found - did you forget to install libstdc++-devel ?" The configure test program that failed is: ********************************************* /* file: test.cpp */ #include <string> using namespace std; int main () { string astring="Hello World"; astring.erase(0, 6); // now astring is "World" return 0; } *********************************************************** This program compiles without errors with g++ -pedantic test.cpp also, g++ -O test.cpp produces no errors. The combination " g++ -pedantic -O test.cpp" gives: In file included from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:683, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/cstdio:52, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/i686-pc-linux-gnu/bits/c++io.h:35, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/bits/fpos.h:44, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/bits/char_traits.h:46, from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/g++-v3/string:47, from test.cpp:1: /usr/include/bits/stdio.h: In function `int getchar()': /usr/include/bits/stdio.h:42: declaration of `int getchar()' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:394: than previous declaration `int getchar() throw ()' /usr/include/bits/stdio.h: In function `int getc_unlocked(FILE*)': /usr/include/bits/stdio.h:51: declaration of `int getc_unlocked(FILE*)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:403: than previous declaration `int getc_unlocked(FILE*) throw ()' /usr/include/bits/stdio.h: In function `int getchar_unlocked()': /usr/include/bits/stdio.h:58: declaration of `int getchar_unlocked()' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:404: than previous declaration `int getchar_unlocked() throw ()' /usr/include/bits/stdio.h: In function `int putchar(int)': /usr/include/bits/stdio.h:67: declaration of `int putchar(int)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:419: than previous declaration `int putchar(int) throw ()' /usr/include/bits/stdio.h: In function `int fputc_unlocked(int, FILE*)': /usr/include/bits/stdio.h:76: declaration of `int fputc_unlocked(int, FILE*)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:428: than previous declaration `int fputc_unlocked(int, FILE*) throw ()' /usr/include/bits/stdio.h: In function `int putc_unlocked(int, FILE*)': /usr/include/bits/stdio.h:86: declaration of `int putc_unlocked(int, FILE*)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:433: than previous declaration `int putc_unlocked(int, FILE*) throw ()' /usr/include/bits/stdio.h: In function `int putchar_unlocked(int)': /usr/include/bits/stdio.h:93: declaration of `int putchar_unlocked(int)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:434: than previous declaration `int putchar_unlocked(int) throw ()' /usr/include/bits/stdio.h: In function `__ssize_t getline(char**, size_t*, FILE*)': /usr/include/bits/stdio.h:103: declaration of `__ssize_t getline(char**, size_t*, FILE*)' throws different exceptions /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/include/stdio.h:480: than previous declaration `__ssize_t getline(char**, size_t*, FILE*) throw ()' However, the new kde packages can be compiled with CXXFLAGS="-O0" in /etc/make.conf, unfavourably without any optimization. Reproducible: Always Steps to Reproduce: 1. emerge kde 2. 3. Actual Results: The system starts to emerge arts-3.1.5, the configure program fails (see above) Expected Results: compile the string::erase test program (see above) with default -pedantic and user specified optimization in /etc/make.conf Portage 2.0.49-r21 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.0-gentoo) ================================================================= System uname: 2.6.0-gentoo i686 AMD Athlon(tm) MP 2600+ Gentoo Base System version 1.4.3.10 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-mp -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb:/usr/kde/3.1/share/config:/usr/share/texmf/tex/generic/config/ /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/platex/config/:/usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-O3 -march=athlon-mp -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb cdr crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd tetex truetype x86 xml2 xmms xv zlib"
*** This bug has been marked as a duplicate of 26183 ***
If, however, reemerging gcc is not possible, use CXXFLAGS=" -O0 -funroll-loops -fomit-frame-pointer -fprefetch-loop-arrays -march=pentium4 -fforce-mem -foptimize-sibling-calls -fstrength-reduce -fregmove -fno-sched-interblock -pipe" in /etc/make.conf to compile optimized kde packages