This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Compiling stdc++ with strong symbol versioning
- From: Ian Lance Taylor <iant at google dot com>
- To: Michael Dehmlow <dehmlowm at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 19 May 2009 17:13:03 -0700
- Subject: Re: Compiling stdc++ with strong symbol versioning
- References: <23618767.post@talk.nabble.com>
Michael Dehmlow <dehmlowm@gmail.com> writes:
> Hello I'm relatively new to gcc development and I'm having trouble with
> different versions of libstdc++.so being used at runtime. Basically I'm
> creating an api which is used by a third party application (labview) which
> uses libstdc++.so.5 my api needs to be compiled with libstdc++.so.6.
As you've discovered, it generally does not work to mix versions of
libstdc++.so.
> This issue is detailed in the following gcc bug:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21405
> The resolution appears to be detailed in
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24660
>
> As far as I can tell (PLEASE tell me if I'm mistaken) I need to recompile
> either my gcc compiler (version 4.1.2) or the stdlibc++.so.6 with the
> --enable-symvers=gnu-versioned-namespaces flag then recompile my application
> with the new compiler/ stdc++ library.
That seems worth trying but I don't know whether it will work.
> So my question is how do I do this? Do I need to recompile just my stdc++
> library or my entire gcc compiler is this documented some where.
You need to rebuild the whole compiler. http://gcc.gnu.org/install/ .
Pass the --enable-symvers option to the top level configure script.
Your other option is to use an older version of gcc which uses
libstdc++.so.5.
Ian