Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15288 - GCC 3.2.2 emerge breaks bunch of stuff (missing libstdc++.so.5)
Summary: GCC 3.2.2 emerge breaks bunch of stuff (missing libstdc++.so.5)
Status: RESOLVED DUPLICATE of bug 15025
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-07 15:12 UTC by Alain Penders (RETIRED)
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Penders (RETIRED) gentoo-dev 2003-02-07 15:12:16 UTC
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.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-08 02:38:58 UTC
Works fine here.  Only thing it can be is that pkg_postinst() your side did
not run gcc-config.
Comment 2 Jim Bray 2003-02-17 15:36:15 UTC
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'
Comment 3 Martin Schlemmer (RETIRED) gentoo-dev 2003-02-17 17:01:58 UTC
You are at the wrong bug, look at:

   http://bugs.gentoo.org/show_bug.cgi?id=15025

for the fix.
Comment 4 DMcLF 2003-02-24 08:05:45 UTC
/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
Comment 5 DMcLF 2003-02-24 08:17:09 UTC
p.s.

i confirm this problem when upgrading 2 machines from gcc 3.2.1 to 3.2.2
Comment 6 Corvus 2003-02-24 21:26:21 UTC
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 .. :-) 
 
 
Comment 7 Corvus 2003-02-24 21:33:06 UTC
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 
Comment 8 Alexander Staubo 2003-03-06 00:06:33 UTC
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.
Comment 9 Rev. Jeffrey Paul 2003-03-07 00:33:24 UTC
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.
Comment 10 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-08 22:18:33 UTC
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.
Comment 11 Martin Schlemmer (RETIRED) gentoo-dev 2003-03-13 23:59:30 UTC

*** This bug has been marked as a duplicate of 15025 ***