I get this error when trying to emerge media-libs/musicbrainz-2.0.1: gcc -march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -o .libs/findartist findartist.o ../lib/.libs/libmusicbrainz.so -lstdc++ -lm /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so: undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3' I get the same thing when trying to emerge app-text/ghostscript-7.07.1-r1 and dev-db/mysql-4.0.17. Reproducible: Always Steps to Reproduce: 1.emerge musicbrainz 2. 3. Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031212-r0,2.2.5-r2, 2.6.3) ================================================================= System uname: 2.6.3 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.13 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/quake3/cpma/server.cfg /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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/env.d" CXXFLAGS="-march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays" DISTDIR="/usr/portage/distfiles" FEATURES="" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://gentoo.inode.at/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="X aalib aavm acpi alsa apache2 avi berkdb bonobo cdr crypt cups dga directfb doc dvd encode evo faad fam fbcon flac foomaticdb ggi gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imap imlib imlib2 java jpeg lcms ldap libg++ mad maildir matrox mmx motif mozilla moznoirc moznomail mpeg mysql ncurses nls nocardbus oggvorbis opengl oss pam pdflib perl pic png ppds python qt quicktime readline samba sdl speex spell sse ssl tetex theora tiff truetype x86 xine xml xml2 xmms xv zlib"
can you please tone your CFLAGS and CXXFLAGS down a bit. -march=pentium3 -O2 -pipe -fomit-frame-pointer is all you need. The rest are dangerous
It doesn't fix the problem.
well this isn't a sound thing as the unresolved symbol is in /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so Please provide the output of: $ ldd /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so $ emerge info
try #ldconfig
Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040207-r0,2.2.5-r2, 2.6.3) ================================================================= System uname: 2.6.3 i686 Pentium III (Coppermine) Gentoo Base System version 1.4.3.13 distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [disabled] Autoconf: sys-devel/autoconf-2.58-r1 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/quake3/cpma/server.cfg /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /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/env.d" CXXFLAGS="-march=pentium3 -O2 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="" GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ http://gentoo.inode.at/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="X aalib aavm acpi alsa apache2 avi berkdb bonobo cdr crypt cups dga directfb doc dvd encode evo faad fam fbcon flac foomaticdb ggi gif gimpprint gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imap imlib imlib2 java jpeg lcms ldap libg++ mad maildir matrox mmx motif mozilla moznoirc moznomail mpeg mysql ncurses nls nocardbus oggvorbis opengl oss pam pdflib perl pic png ppds python qt quicktime readline samba sdl speex spell sse ssl tetex theora tiff truetype x86 xine xml xml2 xmms xv zlib" odysseus root # ldd /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so) linux-gate.so.1 => (0xffffe000) libm.so.6 => /lib/libm.so.6 (0x400d0000) libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.1.1/libgcc_s.so.1 (0x400f2000) libc.so.6 => /lib/libc.so.6 (0x400fa000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) I'll reemerge gcc with the lesser optimizations and see what happens.
I reemerged gcc with the lesser optimizations and the problem has not gone away.
Same here on 2 different computers: For example it occurs while upgrading ghostscript to 7.07.1-r1: if [ x != x ]; then LD_RUN_PATH=; export LD_RUN_PATH; fi; \ XCFLAGS= XINCLUDE= XLDFLAGS= XLIBDIRS= XLIBS= \ FEATURE_DEVS= DEVICE_DEVS= DEVICE_DEVS1= DEVICE_DEVS2= DEVICE_DEVS3= \ DEVICE_DEVS4= DEVICE_DEVS5= DEVICE_DEVS6= DEVICE_DEVS7= DEVICE_DEVS8= \ DEVICE_DEVS9= DEVICE_DEVS10= DEVICE_DEVS11= DEVICE_DEVS12= \ DEVICE_DEVS13= DEVICE_DEVS14= DEVICE_DEVS15= DEVICE_DEVS16= \ DEVICE_DEVS17= DEVICE_DEVS18= DEVICE_DEVS19= DEVICE_DEVS20= \ /bin/sh <./obj/ldt.tr ./obj/imain.o(.text+0x124e): In function `gs_main_tempnames': : undefined reference to `rpl_malloc' ./obj/icc.o(.text+0x379): In function `icmAllocStd_malloc': : undefined reference to `rpl_malloc' ./obj/gdevifno.o(.text+0xfeb): In function `initwriteimage': : undefined reference to `rpl_malloc' ./obj/dscparse.o(.text+0x17): In function `dsc_init': : undefined reference to `rpl_malloc' ./obj/dscparse.o(.text+0xcee4): In function `dsc_parse_process_colours': : undefined reference to `rpl_malloc' ./obj/dscparse.o(.text+0xd334): more undefined references to `rpl_malloc' follow/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so: undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3' collect2: ld returned 1 exit status distcc[12476] ERROR: compile on localhost failed make: *** [bin/gs] Fehler 1 ldd /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so) libm.so.6 => /lib/libm.so.6 (0x400c8000) libgcc_s.so.1 => /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcc_s.so.1 (0x400ea000) libc.so.6 => /lib/libc.so.6 (0x400f2000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000) emerge info: Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.25_pre6-gss) ================================================================= System uname: 2.4.25_pre6-gss i686 Mobile Pentium II Gentoo Base System version 1.4.3.13 distcc 2.12.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.58 Automake: sys-devel/automake-1.7.7 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=pentium2 -O2 -pipe -mmmx -fomit-frame-pointer -funroll-loops" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium2 -O2 -pipe -mmmx -fomit-frame-pointer -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distcc sandbox" GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://www.fhh.opensource-mirror.de/gentoo.org/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/temp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://server/gentoo-portage" USE="X aalib acpi alsa apm avi berkdb bonobo cdr crypt cups dga directfb fbcon foomaticdb gb gdbm gif gnome gpm gtk gtk2 gtkhtml guile imlib java javascript jpeg ldap libg++ libwww lirc mad mikmod mmx motif mozcalendar mozilla moznoirc mpeg mysql ncurses nls oggvorbis opengl oss pam pcmcia pdflib perl png pnp python quicktime readline samba sdl slang spell ssl svga tcltk tcpd tiff truetype trusted usb wmf wxwindows x86 xml xml2 xmms xosd xv zlib"
I was wondering why ldd ..libstdc++.so shows libgcc_s.so.1 from a different gcc-lib dir. So I checked with etcat -v gcc, if there is another version of gcc installed, but there is only the 3.3 version marked as installed. I tried gcc-config -l, and this shows also the old gcc-3.2 version. (I have both computers updated from gcc-3.2 some time before). So I moved the complete directory /usr/lib/gcc-lib/i686.../3.2.2 to /tmp and ran ldconfig && env-update && source /etc/profile Now it works. It seems that the cleaning after installing gcc-3.3.2 wasnt fully working?
gcc -march=pentium3 -O3 -pipe -fomit-frame-pointer -fforce-addr -falign-functions=4 -fprefetch-loop-arrays -o .libs/findartist findartist.o ../lib/.libs/libmusicbrainz.so -lstdc++ -lm /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so: undefined reference to `_Unwind_Resume_or_Rethrow@GCC_3.3' Note: it's calling gcc. It seems to work then I substitute gcc to g++.
I've had same problem. I figured out that the upgrade of gcc from version 3.2.3 to 3.3.2 left some files under /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 (emerge doesn't clean them while upgrading to new gcc). Simply delete whole directory /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3 and then run ldconfig.
Thanks. Is there some sort of problem with the gcc ebuild that should be fixed, or was it fixed, just to late to fix my box?
please paste #emerge unmerge gcc -p
jonny@odysseus jonny $ emerge unmerge gcc -p >>> These are the packages that I would unmerge: sys-devel/gcc selected: 3.3.2-r5 protected: none omitted: none >>> 'Selected' packages are slated for removal. >>> 'Protected' and 'omitted' packages will not be removed. I fixed the problem by following comment #10
closing
I tried following #10 but that directory doesn't exist on my box and the problem persists. ll /usr/lib/gcc-lib/i686-pc-linux-gnu/ total 4 drwxr-xr-x 2 root root 144 Feb 24 2003 3.2 drwxr-xr-x 2 root root 144 Feb 24 2003 3.2.1 drwxr-xr-x 5 root root 2160 Mar 15 05:00 3.3.2
yes - if you are using gcc 3.3.2, you need to delete dirs 3.2 3.2.1
deleted those directories but the problem remains, even after emerging gcc again. ll /usr/lib/gcc-lib/i686-pc-linux-gnu/ total 3 drwxr-xr-x 5 root root 2160 Mar 25 19:23 3.3.2