After upgrading gcc to 3.4.4 using sys-devel/gcc in package.keywords to unmask the ~x86 ebuild and pruning away the old gcc version system critical libraries are broken. Running emerge, env-update, or, it seams, anything that uses python results in the error:/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory A number of steps were taken to attempt to correct the problem after it was found that symlinking libstdc++.so.5 to the most recent version of the libstdc++.so in /usr/lib/gcc/i686-pc-linux-gnu/3.4.4 and running python programs with the following enviornment variable on the command line works to an extent: LD_LIBRARY_PATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.4" emerge info This runs as expected. However, I have found that this program does not work with that variable and realize that it is not a fix, just a hack: livecd / # LD_LIBRARY_PATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.4" gcc-config 1 * Switching to i686-pc-linux-gnu-3.4.4 compiler... /usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory * /usr/bin/gcc-config: Could not get portage CHOST! /usr/bin/gcc-config: line 1: env: command not found * /usr/bin/gcc-config: Could not get portage CHOST! /usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory * /usr/bin/gcc-config: Could not get portage CHOST! /usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory * /usr/bin/gcc-config: Could not get portage CHOST! /usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory * /usr/bin/gcc-config: Could not get portage CHOST! ldconfig was run as well as fix_libtool_files. The file /etc/env.d/05gcc contains the correct LDPATH and an additional variable, LD_LIBRARY_PATH, was added which refers to LDPATH in an attempt to fix the problem. The file /etc/env.d/gcc/i686-pc-linux-gnu-3.4.4 was dealt with the same way and env-update and source /etc/profile run with no positive results. Reproducible: Always Steps to Reproduce: 1. emerge gcc (with ~x86 keyword) 2. emerge -p gcc 3. run a program involving libstdc++.so.5 (env-update, emerge) Actual Results: Running emerge, env-update, or, it seams, anything that uses python results in the error:/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory Expected Results: An install of gcc 3.4.4 that works cleanly. livecd / # LD_LIBRARY_PATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.4" emerge info Portage 2.0.51.19 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r0, 2.6.11-gentoo-r3 i686) ================================================================= System uname: 2.6.11-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz Gentoo Base System version 1.4.16 Python: dev-lang/python-2.3.4-r1 [2.3.4 (#1, Mar 11 2005, 17:34:27)] dev-lang/python: 2.3.4-r1 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=pentium4 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.mirrors.tds.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.netnitco.net ftp://pandemonium.tiscali.de/pub/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X alsa apm arts avi berkdb bitmap-fonts crypt cups emboss encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
*** This bug has been marked as a duplicate of 84961 ***