help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Link g++ 3.3 libs with g++ 3.2 binary?


From: Derekasaurus Rex
Subject: Re: Link g++ 3.3 libs with g++ 3.2 binary?
Date: Mon, 4 Aug 2008 13:47:07 -0700 (PDT)
User-agent: G2/1.0

On Aug 4, 3:41 pm, Robert Heller <hel...@deepsoft.com> wrote:
> At Mon, 4 Aug 2008 10:52:38 -0700 (PDT) Derekasaurus Rex 
> <derek.goo...@grog.net> wrote:
>
> > I have a C++ product that consists of application code and quite a few
> > OSS libraries. Until recently everything was compiled using g++
> > 3.3.2-1 (henceforth 3.3). Unfortunately this compiler is not the
> > standard version on my target Linux platform (CentOS 3.9) which uses
> > the slightly older gcc-3.2.3-59 (henceforth 3.2) in its standard
> > toolchain.
>
> > The decision to use a non-standard version of GCC was a foolish one
> > and I want to revert our project to g++ 3.2, the standard version for
> > our CentOS 3.9 platform.
>
> > Naturally it would be ideal if I could rebuild every line of code with
> > g++ 3.2 for a completely clean re-compile. However, for reasons beyond
> > the scope of this post, there is some risk and complexity associated
> > with this, and rebuilding every third-party OSS library with g++ 3.2
> > is not trivial.
>
> > Would it be completely foolish to switch compilers and build all of my
> > application code with g++ 3.2 while continuing to link with OSS
> > libraries built with 3.3? Does g++ offer sufficient binary
> > compatibility within the 3.x tree? Or is the only responsible path to
> > rebuild all of my code, including third-party libraries, with the same
> > compiler, namely 3.2?
>
> > Of course I plan to eventually rebuild everything with 3.2, but I'm
> > trying to understand if this can be done in stages (i.e., application
> > code first, then third-party libraries).
>
> > Any input appreciated. Thanks.
>
> You *should* re-build everything with the same version of the compiler.
> I know, a complete pain, but there is probably nothing else you can do.
> The name mangling is not compatible across versions.  I believe Gcc is
> version compatible at the patch level -- eg all 3.2.x versions are
> inter-compatible and all 3.3.x versions inter-compatible, but 3.2.x and
> 3.3.x are NOT inter-compatible.
>
> --
> Robert Heller             -- Get the Deepwoods Software FireFox Toolbar!
> Deepwoods Software        -- Linux Installation and 
> Administrationhttp://www.deepsoft.com/ -- Web Hosting, with CGI and Database
> hel...@deepsoft.com       -- Contract Programming: C/C++, Tcl/Tk

Thanks. Though the name mangling *is* compatible between 3.2 and 3.3
because I have already successfully linked my 3.2-compiled application
code with my 3.3-compiled libraries. Furthermore, the applications
*appear* to work, though I haven't run a full regression.
Nevertheless, this probably has more to do with luck than intentional
compatibility, so I agree that recompiling everything is probably the
most sane approach, and it's the one I will pursue.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]