libstdc issue

Ian Lance Taylor iant@google.com
Sat Mar 7 01:57:00 GMT 2009


"Koornstra, Reinoud" <koornstra@hp.com> writes:

> I compiled gcc 4.1.2 and installed it.
> Compiled swig as well, however, upon starting it give me this:
>
> swig: /lib/libgcc_s.so.1: version `GCC_4.2.0' not found (required by /lib/libstdc++.so.6)
>
> These libs come included in gcc and I cannot image that such an inconsistency would exist in the gcc source.
> Any hints how to resolve this?

gcc does not normally install libgcc_s.so.1 in /lib, so my guess is that
that file came from your OS, and your dynamic linker is finding it
before the libgcc_s.so.1 which was installed by gcc.  You could try
making it a symlink to the libgcc_s.so.1 which you installed.

Note that you can confuse systems by building and installing gcc into
system directories like /lib, overwriting the system libraries and
compilers.  It's often better to install gcc and use it elsewhere.

Ian



More information about the Gcc-help mailing list