This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++ incompatibilities...please enlighten.


Paul Duffy <paduffy@cisco.com> writes:

> >Date: Thu, 21 Sep 2000 22:24:42 -0400
> >To: libstdc++@sources.redhat.com:
> >From: Paul Duffy <paduffy@cisco.com>
> >Subject: libstdc++ incompatibilities...please enlighten.
> >
> >Hello All,
> >
> > I've got a C++ app developed using egcs-2.91.66 (egcs-1.1.2),
> > developed on a RedHat 6.2 box.
> > The application includes various shared libraries that make use of
> > various STL facilities
> >This app is linked against libstdc++-2-libc6.1-1-2.9.0.so (revealed via ldd).
> >The binaries run fine on this and other RH 6.2 boxes.
> >
> > Taking this same set of binaries (i.e. a binary installation
> > package) to a Mandrake 7.0 machine and attempting to run results in
> > (I assume) the dynamic linker complaining that
> > "...default_alloc_template...blah blah" is unresolved.  Looks like
> > trouble in STL land.  The Mandrake machine paths the libstdc++ to
> > libstdc++-3-libc6.1-2-2.10.0.so.

This is because mandrake 7.0 uses gcc 2.95.2.

egcs 1.1.x and gcc 2.95.x have incompatible C++ ABIs.

I know of 3 solutions:

  (0) Make two different binary packages - one for egcs 1.1.x systems
      (that is, systems where the C++ libs were built with egcs
      1.1.x), and a different one for gcc 2.95.2 systems.

  (1) Provide full source, and convince your users to build from
      source.

  (2) Provide staticly linked binaries. (I have not tested this, but
      it should work.)

The next major version of gcc (gcc 3.0, probably) will have yet
  another incompatible C++ ABI - but, it will be the last C++ ABI
  change for a long time.

(These incompatible changes are necessary to fix certain bugs.)

> >
> > The Mandrake system appears to have a later version libstdc++ which
> > is not compatible  with the RH 6.2 libstdc++ (?)
> >
> > My question is..how do I best insulate myself from problems
> > resulting in building with gcc/libstdc++ version X on Linux platform
> > Y, packaging the binaries , and installing and running the binaries
> > on Linux platform  Z.
> >
> >Cheers,
> >
> 
> *********************************************************
> Paul B Duffy                978-244-4754 Fax 978-244-8917
> Cisco Systems, Inc.         paduffy@cisco.com
> 300 Apollo Drive
> Chelmsford, MA 01824
> *********************************************************

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]