Case history: Installing libstdc++ on i686-pc-linux-gnu (Red Hat)

Avi Green
Tue Mar 28 23:30:00 GMT 2000

Alexandre Oliva wrote:

> > p.s.  After I installed v3, I found that
> > /usr/lib/ had been removed.  I couldn't find
> > any reference to that file in the v3 source tree, but it could have
> > been wiped by one of the 2.95.2 RPMs.
> You should certainly arrange for this file not to be removed, even if
> you upgrade libstdc++.  Did you upgrade libstdc++ using RPM?  There
> must be a way to arrange for it to upgrade a package without removing
> the previous version's libraries.

After two days of blindly scavenging all of my packages and logs,
I have finally realized (at 1 AM) that I was looking for the wrong
file all along: /usr/lib/ is a symbolic link
to on my system, and it's actually
the latter file which is gone.  Apparently it was removed by the
postinstall script from gcc-c++-2.95.2-3.i386.rpm as part of its
half-successful attempt to remove egcs-c++ from my system.  It also
upgraded my libstdc++-2-libc6.1-1-2.*.*.a and libstdc++-libc6.1-*.a.*.

So:  What should I do?  Should I look for an old copy of the file on the 'net and just and paste it back
into /usr/lib?  A good deal of the commands on my system require it.
One idea: I observe that the gcc-c++ RPM info says that it "does
include the static standard C++ library and C++ header files; the
library for dynamically linking programs is available separately."
Perhaps that would solve the problem?  Or is this something I can
solve by pointing the symlink somewhere
else or by setting LD_LIBRARY_PATH?

Any help would be appreciated.

Thanks again,

p.s.  I couldn't find any mention of this in either the gcc docs or the
      libstdc++ docs.  One or two messages in the gcc-help list archive
      seemed vaguely related, but no dice.

p.p.s. For those interested, I have reconstructed the steps I took
      installing gcc and libstdc++ over the last week.  You won't need
      it to help me, but since I spent a few hours trying to reconstruct
      this sequence before I knew the problem lay with my installation
      of the gcc-c++ RPM, here it is:

0. Tried (& failed) to make gcc & g++ from tarballs.  Gave up.
1. Installed libstdc++-devel-2.95.2-3.i386.rpm
   Note: Querying the package reveals that it OBSOLETES
2. Tried to install gcc-2.95.2-3.i386.rpm but was told I needed an
   up-to-date version of binutils (and cpp?)
3. Tried to install cpp-2.95.2-3.i386.rpm but was told I needed an
   up-to-date version of binutils
4. Installed binutils-
5. Installed cpp-2.95.2-3.i386.rpm
6. Tried to install gcc-2.95.2-3.i386.rpm but was told that
   egcs = 1.1.2 is needed by egcs-c++-1.1.2-12
7. Installed gcc-2.95.2-3.i386.rpm using rpm -U --nodeps
   Note: Querying the package reveals that it OBSOLETES egcs.
   This removed various files in /usr/lib/gcc-lib/i386-redhat-linux/
   egcs-2.91.66.  It also removed the egcs (1.1.2) package.
7. Installed gcc-c++-2.95.2-3.i386.rpm
   Note: Querying the package reveals that it OBSOLETES egcs-c++.
   Interestingly, my installation log for this RPM reveals that, the missing file, is a dependency:
     D: dependencies: looking for
     D: removing provides index for
     D: removing provides index for
   Apparently this removed the egcs-c++ package, which contained
8. Made and installed libstdc++-2.90.8 from tarball.
   Played with the links.
9. Discovered that the man(1) command no longer worked because (a.k.a.
   was no longer on the system.

=========  Avi Green :) (:  =========
========     Unix S/A & System Specialist     ========
========  avi at   212 217-1147  ========

More information about the Gcc-help mailing list