After emerging gcc 3.2.2, I noticed python stopped working. E.g.: black env.d # gcc-config --list-profiles /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: Profile does not exist! This means I couldn't run gcc-config, etc-update, emerge, etc. I looked at /etc/env.d/05gcc, and it said: PATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2" ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/3.2" MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man" INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info" CC="gcc" CXX="g++" LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1" After manually changing the last line to 3.2.2, adding the new path to LD_LIBRARY_PATH, and running etc-update, the problem was solved. Considering the severity of this problem (it totally hoses the average user), this should be prevented from happening. Reproducible: Didn't try Steps to Reproduce: 1. 2. 3.
Works fine here. Only thing it can be is that pkg_postinst() your side did not run gcc-config.
I confirm this problem. In my case anyway it appears that env-update is broken. Lots of stuff, including LD_PATH, is not making it from the files in env.d into profile.env. I'm trying to emerge gnome, and I'm getting stuff failing looking for ....3.2.1/libstdc++, while I've got 3.2.2, and the stuff in env.d specifies 3.2.2, and gcc-config shows 3.2.2 gilgamesh etc # more profile.env # THIS FILE IS AUTOMATICALLY GENERATED BY env-update. # DO NOT EDIT THIS FILE. CHANGES TO STARTUP PROFILES # GO INTO /etc/profile NOT /etc/profile.env export KDEDIRS='/usr/kde/3.1:/usr' export INFODIR='/usr/share/info:/usr/X11R6/info' export INFOPATH='/usr/share/info:/usr/share/gcc-data/i586-pc-linux-gnu/3.2/inf o' export CONFIG_PROTECT_MASK='/etc/gconf' export CLASSPATH='/opt/blackdown-jre-1.3.1/lib/rt.jar:.' export ROOTPATH='/usr/local/bin:/opt/bin:/usr/i586-pc-linux-gnu/gcc-bin/3.2:/u sr/X11R6/bin:/opt/blackdown-jre-1.3.1/bin:/usr/qt/3/bin:/usr/kde/3.1/sbin:/usr /kde/3.1/bin:/usr/kde/3.1/sbin:/usr/kde/3.1/bin' export CONFIG_PROTECT='/usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/k de/3.1/share/config /usr/share/config' export MANPATH='/usr/share/man:/usr/local/share/man:/usr/share/gcc-data/i586-p c-linux-gnu/3.2/man:/usr/X11R6/man:/opt/blackdown-jre-1.3.1/man' export PATH='/usr/local/bin:/opt/bin:/usr/i586-pc-linux-gnu/gcc-bin/3.2:/usr/X 11R6/bin:/opt/blackdown-jre-1.3.1/bin:/usr/qt/3/bin:/usr/kde/3.1/bin:/usr/kde/ 3.1/bin' export KDEDIR='/usr/kde/3.1' export LESS='-R' export CC='gcc' export PAGER='/usr/bin/less' export HOSTNAME='gilgamesh.uruk' export LESSOPEN='|lesspipe.sh %s' export QMAKESPEC='linux-g++' export CXX='g++' export CVS_RSH='ssh' export DISPLAYMANAGER='gdm' export EDITOR='/bin/nano' export QTDIR='/usr/qt/3' export JRE_HOME='/opt/blackdown-jre-1.3.1' export JAVA_HOME='/opt/blackdown-jre-1.3.1' export XINITRC='/etc/X11/xinit/xinitrc'
You are at the wrong bug, look at: http://bugs.gentoo.org/show_bug.cgi?id=15025 for the fix.
/etc/ld.so.conf change: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.1 to: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2 then run ldconfig
p.s. i confirm this problem when upgrading 2 machines from gcc 3.2.1 to 3.2.2
i had the problem with 2 machines when upgrading, Eric here is what i noticed:: VikingPC raven # emerge -u gcc ... ... --- /lib/ --- /etc/ --- /etc/env.d/ --- /etc/env.d/gcc/ >>> /etc/env.d/gcc/i686-pc-linux-gnu-3.2.2 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcc_s.so -> libgcc_s.so.1 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libstdc++.so -> libstdc++.so.5.0.2 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libobjc.so.1 -> libobjc.so.1.0.0 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcj.so -> libgcj.so.3.0.0 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcj.so.3 -> libgcj.so.3.0.0 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libg2c.so -> libg2c.so.0.0.0 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libg2c.so.0 -> libg2c.so.0.0.0 /usr/sbin/ebuild.sh: line 488: gcc-config: command not found * Scanning ~/lib... * Scanning /usr/lib/opengl/nvidia/lib... * Scanning /usr/lib/mozilla... * Scanning /usr/X11R6/lib... * Scanning /opt/blackdown-jdk-1.3.1/jre/lib/i386... * Scanning /opt/blackdown-jdk-1.3.1/jre/lib/i386/native_threads... * Scanning /usr/qt/3/lib... * Scanning /usr/kde/3.1/lib... * FIXING: /usr/kde/3.1/lib/libmcop.la * FIXING: /usr/kde/3.1/lib/libartsflow_idl.la * FIXING: /usr/kde/3.1/lib/libartsflow.la * FIXING: /usr/kde/3.1/lib/libmcop_mt.la ... ... ( autoclean of old gcc-3.2.1) ... ... >>> Regenerating /etc/ld.so.cache... >>> Regenerating /etc/ld.so.cache... >>> Auto-cleaning packages ... >>> No outdated packages were found on your system. * Regenerating GNU info directory index... * Processed 86 info files. VikingPC raven # emerge python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory VikingPC raven # --- fixing LDPATH in /etc/env.d/05gcc VikingPC raven # env-update /usr/bin/python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory --- rofl VikingPC raven # export LDPATH="/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2" VikingPC raven # ldconfig VikingPC raven # env-update /usr/bin/python2.2: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory VikingPC raven # --- grrrr VikingPC raven # cd /usr/lib/gcc-lib/i686-pc-linux-gnu/ VikingPC i686-pc-linux-gnu # mv 3.2.1 3.2.1.alt VikingPC i686-pc-linux-gnu # ln -s 3.2.2 3.2.1 VikingPC i686-pc-linux-gnu # ldconfig VikingPC i686-pc-linux-gnu # env-update >>> Regenerating /etc/ld.so.cache... --- hmm VikingPC i686-pc-linux-gnu # rm 3.2.1 VikingPC i686-pc-linux-gnu # mv 3.2.1.alt 3.2.1 VikingPC i686-pc-linux-gnu # ldconfig VikingPC i686-pc-linux-gnu # emerge emerge: please tell me what to do. Usage: emerge [ options ] [ action ] [ ebuildfile | tbz2file | dependency ] [ ... ] emerge [ options ] [ action ] < system | world > emerge < sync | rsync | info > emerge --help -h [ system | config ] Options: -[abcCdefhikKlnoOpPsSuvV] [--deep] [--oneshot] Actions: [ clean | depclean | inject | prune | regen | search | unmerge ] For more help try 'emerge --help' or consult the man page. --- ok now it works again .. :-)
on a third system (installed 1.4 very recently there) the error didnt occur gcc-conf runned there: emerge -u gcc ... ... ... >>> /etc/env.d/gcc/i686-pc-linux-gnu-3.2.2 >>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/libgcc_s.so -> libgcc_s.so.1 >>> /usr/lib/gcc-l * Switching to i686-pc-linux-gnu-3.2.2 compiler... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * # source /etc/profile * Scanning ~/lib... * Scanning /usr/lib/opengl/xfree/lib... * Scanning /usr/X11R6/lib... ... ... and emerge worked perfectly afterwards, so this seems to be the source of the bug. somehow gcc-config wasnt there correctly, so its a gcc-config bug IMHO ;) Eric
System hosed here. Here's from emerge: >>> Merging sys-devel/gcc-3.2.2 to / --- /etc/ --- /etc/env.d/ >>> /etc/env.d/gcc/ >>> /etc/env.d/gcc/i586-pc-linux-gnu-3.2.2 [...] >>> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/libobjc.so -> libobjc.so.1.0.0 >>> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/libstdc++.so -> libstdc++.so.5.0.2 >>> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/libg2c.so.0 -> libg2c.so.0.0.0 >>> /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2/libstdc++.so.5 -> libstdc++.so.5.0.2 /var/tmp/portage/gcc-3.2.2/temp/fix_libtool_files.sh: line 40: [: too many arguments gawk: fatal: can't open source file `portage:' for reading (No such file or directory) >>> Regenerating /etc/ld.so.cache... >>> sys-devel/gcc-3.2.2 merged. At this point, I have both /usr/i586-pc-linux-gnu/gcc-bin/3.2 and /usr/lib/gcc-lib/i586-pc-linux-gnu/3.2.2. Martin Schlemmer's fix didn't work right away. gcc-config says there is no default profile. Doing "gcc-config i586-pc-linux-gnu-3.2.2" at least gives me a seemingly working version of GCC and libs, and makes emerge run again, so I'm optimistic, but I'm still playing doctor with my system.
i had the same problem, only i had to do the following to fix it: echo "/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2" >> /etc/ld.so.conf ldconfig gcc-config i686-pc-linux-gnu-3.2.2 env-update source /etc/profile now all is well, it appears.
Ok, I did some changes to try and prevent this in future: ---------------------- 09 Mar 2003; Martin Schlemmer <azarah@gentoo.org> gcc-3.2.2*.ebuild : Fix handling of fix_libtool_files.sh to be more $FILESDIR independant. We basically install it to /sbin now, and then call it from there. Also export LD_LIBRARY_PATH with new gcc library path in it to prevent gcc-config from borking when run. This will hopefully fix bugs #15288, #16632, #16797.
*** This bug has been marked as a duplicate of 15025 ***