When I try to emerge kdegraphics 3.3.1-r1 that compile halts at the following place. Reproducible: Always Steps to Reproduce: 1. ACCEPT_KEYWORDS="~x86" emerge -u kdegraphics 2. 3. Actual Results: /bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -march=pentium4 -O3 -pipe -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o kcm_kgamma.la -rpath /usr/kde/3.3/lib/kde3 -L/usr/X11R6/lib -L/usr/qt/3/lib -L/usr/kde/3.3/lib -module -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -R /usr/kde/3.3/lib -R /usr/qt/3/lib -R /usr/X11R6/lib xf86configpath.lo xvidextwrap.lo displaynumber.lo gammactrl.lo kgamma.lo -lXxf86vm -lkdeui -lkdecore -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread .libs/xf86configpath.o(.text+0x1c): In function `XF86ConfigPath::XF86ConfigPath()': : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' .libs/xf86configpath.o(.text+0x300): In function `XF86ConfigPath::XF86ConfigPath()': : undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)' .libs/xf86configpath.o(.text+0x4f8): In function `XF86ConfigPath::XF86ConfigPath()': : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' .libs/xf86configpath.o(.text+0x7dc): In function `XF86ConfigPath::XF86ConfigPath()': : undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)' .libs/xf86configpath.o(.gnu.linkonce.t._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs+0x1d6): In function `std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': : undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)' .libs/xf86configpath.o(.gnu.linkonce.t._ZNSt6vectorISsSaISsEE13_M_insert_auxEN9__gnu_cxx17__normal_iteratorIPSsS1_EERKSs+0x20b): In function `std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >> >::_M_insert_aux(__gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': : undefined reference to `std::__default_alloc_template<true, 0>::allocate(unsigned int)' .libs/xvidextwrap.o(.text+0x2e7): In function `XVidExtWrap::_ScreenCount()': : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' .libs/xvidextwrap.o(.text+0x947): In function `XVidExtWrap::_ScreenCount()': : undefined reference to `std::__default_alloc_template<true, 0>::deallocate(void*, unsigned int)' .libs/xvidextwrap.o(.gnu.linkonce.t._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE7seekposESt4fposI11__mbstate_tESt13_Ios_Openmode+0x110): In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::seekpos(std::fpos<__mbstate_t>, std::_Ios_Openmode)': : undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::_M_out_cur_move(long)' .libs/xvidextwrap.o(.gnu.linkonce.t._ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE8overflowEi+0x140): In function `std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::overflow(int)': : undefined reference to `std::basic_streambuf<char, std::char_traits<char> >::_M_out_cur_move(long)' .libs/xvidextwrap.o(.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x39): In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)': : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_create(unsigned int, std::allocator<char> const&)' .libs/xvidextwrap.o(.gnu.linkonce.t._ZNSs12_S_constructIPcEES0_T_S1_RKSaIcESt20forward_iterator_tag+0x8c): In function `char* std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_construct<char*>(char*, char*, std::allocator<char> const&, std::forward_iterator_tag)': : undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage' collect2: ld returned 1 exit status make[4]: *** [kcm_kgamma.la] Error 1 make[4]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r1/work/kdegraphics-3.3.1/kgamma/kcmkgamma' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r1/work/kdegraphics-3.3.1/kgamma/kcmkgamma' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r1/work/kdegraphics-3.3.1/kgamma' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r1/work/kdegraphics-3.3.1' make: *** [all] Error 2 !!! ERROR: kde-base/kdegraphics-3.3.1-r1 failed. !!! Function kde_src_compile, Line 142, Exitcode 2 !!! died running emake, kde_src_compile:make Expected Results: kdegraphics 3.3.1-r1 compiled and installed Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.4, glibc-2.3.4.20041021-r0, 2.6.8-gentoo-r7 i686) ================================================================= System uname: 2.6.8-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz Gentoo Base System version 1.6.4 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux-headers-2.4.22 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium4 -O3 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=pentium4 -O3 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://*******/mirrors/gentoo/ http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bitmap-fonts cdr crypt cups encode esd f77 foomaticdb gdbm gif gnome gpm gtk gtk2 imlib ipv6 java jpeg kde libg++ libwww lirc mad mikmod motif 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"
I am having the same issue but emerging kdegraphics 3.3.1-r2 with gcc-3.4.2-r2 Here is my error list: std::char_traits<char>, std::allocator<char> > > >::erase(__gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, __gnu_cxx::__normal_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::vector<std::basic_string<char, std::char_traits<char>,std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >)': : undefined reference to `__gnu_cxx::__exchange_and_add(int volatile*, int)' collect2: ld returned 1 exit status make[4]: *** [kcm_kgamma.la] Error 1 make[4]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r2/work/kdegraphics-3.3.1/kgamma/kcmkgamma' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r2/work/kdegraphics-3.3.1/kgamma/kcmkgamma' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r2/work/kdegraphics-3.3.1/kgamma' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/kdegraphics-3.3.1-r2/work/kdegraphics-3.3.1' make: *** [all] Error 2 Any new info on this?
I'm of the idea that this is an issue with your build environment and not a kde bug. Maybe I'm wrong. Toolchain can you give us any thoughts?
Are you sure you have the same gcc and glibc versions on all of the machines if using distcc? Try turning off ccache and see if that helps, too.
This is another one similar to bug 70527 and bug 67926. This must be a toolchain issue... As said on bug 67926, after the recent troubles with libtool, my first try would be to reemerge that, or a newer revision.
*** Bug 72687 has been marked as a duplicate of this bug. ***
I tried reemerging libtool, then tried emerging kdegraphics and no luck yet again..
All of you are using gcc 3.3 or also gcc 3.4?
I'm using gcc 3.4.3 and getting the same error.
seems to be working with 3.3.2, compiled just fine. Should this be closed?
lets see if it's a problem for anyone else
Strange. Works for me now. The only thing I added to my CFLAGS was "-fstack-protector" to get arts to compile (different bug). Nothing else was changed.
This bug is caused by binutils-2.15.92.0.2-r1. It seems that this version treats undefined references to these libstdc++ symbols as errors. A possible workaround is to downgrade to version 2.15.90.0.1.1-r3, which emits warnings, but doesn't abort the compilation. Note, that these errors occur on gcc-3.3.4 only (at least on my machine). Switching to gcc-3.4.3 allows to build kdegraphics (and koffice, which is affected too) with latest binutils.
Same bug here: kdegraphics-3.3.2-r2 Failed with both gcc-3.3.5 and gcc-3.4.3 Binutils: 2.15.92.0.2-r1 The command failing is: /bin/sh ../../libtool --silent --mode=link --tag=CXX i686-pc-linux-gnu-g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -O3 -pipe -fomit-frame-pointer -march=athlon-xp -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -o kcm_kgamma.la -rpath /usr/kde/3.3/lib/kde3 -L/usr/lib -L/usr/qt/3/lib -L/usr/kde/3.3/lib -module -avoid-version -module -no-undefined -Wl,--no-undefined -Wl,--allow-shlib-undefined -R /usr/kde/3.3/lib -R /usr/qt/3/lib -R /usr/lib xf86configpath.lo xvidextwrap.lo displaynumber.lo gammactrl.lo kgamma.lo -lXxf86vm -lkdeui -lkdecore -lqt-mt -lz -lpng -lz -lm -lXext -lX11 -lSM -lICE -lpthread Removing the -Wl,--no-undefined allows the command to succeed. The binutils change might have change the way the parameters are parse and now it no longer ignores the --no-undefined. But I would think this is a bug of the makefile (or configure?) rather than of binutils. # cd /var/tmp/portage/kdegraphics-3.3.2-r2/work/kdegraphics-3.3.2/kgamma/kcmkgamma # grep -e --no-undefined * Makefile:KDE_NO_UNDEFINED = -Wl,--no-undefined -Wl,--allow-shlib-undefined # grep KDE_NO_UNDEFINED * Makefile:KDE_NO_UNDEFINED = -Wl,--no-undefined -Wl,--allow-shlib-undefined Makefile:KDE_PLUGIN = -avoid-version -module -no-undefined $(KDE_NO_UNDEFINED) $(KDE_RPATH) $(KDE_MT_LDFLAGS) Makefile.in:KDE_NO_UNDEFINED = @KDE_NO_UNDEFINED@
same thing here with kdegraphics-3.3.2-r2. did an 'emerge sync' and then 'emerge world' after not updating for some time. kdegraphics failed the exact same way. re-emerging libtool didn't help. I tried gcc 3.3.3 and gcc 3.4.3, no difference. manually emerging binutils-2.15.94.0.2 and trying again didn't help either. any specific steps on how to work around this other than stopping the build and manually editing the makefile?
Ok, found out was was the probable cause on my system. I have a second gentoo-x86 system with the same versions of gcc, binutil, libtool etc. But there the problem did not surface. emerge --info was identical except for USE flags, but on the failing system I had trouble with some .la files after upgrading gcc-3.3 (-> fix_libtool_files.sh), so I suspected the cause might be related. What I found were that some kde-related .la files contained /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5/libstdc++.la, some /usr/lib/gcc-lib/i686-pc-linux-gnu/3.4.3/libstdc++.la and some even *both* ! I would suspect this was cause by emerging parts of kde with gcc3.3 and other parts with gcc3.4. I probably missed a source /etc/profile after upgrading from 3.3.4 to 3.3.5 or something like this. My solution: using gcc3.4 to reemerge the parts of kde that are needed by kdegraphics. Running 'emerge --oneshot arts kdelibs kdebase kdegraphics' succeded and I now have kdegraphics-3.3.2-r2 installed. 'emerge -e kdegraphics' or 'emerge -e world' is probably overkill, but should solve the problem in all cases. (I hope.)
I'm copying and pasting a comment I made on some other bugs: In fact the mixing of libstdc++.so.5 and .6 caused by linking a library compiled with gcc 3.3 and the program compiled with gcc 3.4 will bring to these crashes and errors. I've opened a thread on this in the italian forum: http://forums.gentoo.org/viewtopic.php?t=242168 A simple command to launch for fixing will be: (better than an emerge -e world) 1) assure that you are using gcc-3.4.x. 2) rm ~/.revdep-rebuild* revdep-rebuild -X --soname libstdc++.so.5 This will find all the libraries/programs linked to libstdc++.so.5 and recompile them with gcc 3.4.2. if you get some errors, try launching emerge by hand editing the gived emerge command and removing "--oneshot" and the forcing to that version (=foo-ver). But remember to not remove any ebuild from the emerge command because the order is important, as you need to rebuild all in the dependencies order.
*** Bug 81428 has been marked as a duplicate of this bug. ***
*** Bug 84606 has been marked as a duplicate of this bug. ***
*** Bug 91721 has been marked as a duplicate of this bug. ***
toolchain herd, the problem seem still to persist with gcc-3.3.x and binutils-2.15.92.0.2-r7, any input?
*** Bug 96008 has been marked as a duplicate of this bug. ***
*** Bug 99798 has been marked as a duplicate of this bug. ***
*** Bug 100182 has been marked as a duplicate of this bug. ***
*** Bug 100596 has been marked as a duplicate of this bug. ***
*** Bug 102604 has been marked as a duplicate of this bug. ***
*** Bug 106107 has been marked as a duplicate of this bug. ***
*** Bug 103971 has been marked as a duplicate of this bug. ***
Make sure all packages are merged with the same version of gcc, or you will have fun errors like this one :)
This also commonly gets picked up from ccached files and leftovers in /var/tmp/portage, so a cleanout of some of those things might be very helpful in making this error go away.
*** Bug 119886 has been marked as a duplicate of this bug. ***
*** Bug 117642 has been marked as a duplicate of this bug. ***
*** Bug 99109 has been marked as a duplicate of this bug. ***
*** Bug 114943 has been marked as a duplicate of this bug. ***
*** Bug 124438 has been marked as a duplicate of this bug. ***
*** Bug 126210 has been marked as a duplicate of this bug. ***
*** Bug 155435 has been marked as a duplicate of this bug. ***