This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Can GCC / ld selects the version of GLIBCXX from libstdc++.so.6
- From: Brian Dessent <brian at dessent dot net>
- To: hce <webmail dot hce at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 25 Nov 2008 19:06:53 -0800
- Subject: Re: Can GCC / ld selects the version of GLIBCXX from libstdc++.so.6
- References: <95455e980811251843j7e61db40l853238d0c6a1e463@mail.gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
hce wrote:
> I thought, if I can force compiler in FC9 to use old version of
> GLIBCXX_3.4.8, the problem should be resolved. Please advice.
No, that's not possible. Symbol versioning works in one direction only:
code linked against an older version of a library will work with a newer
version of the library found at runtime. But not the reverse.
So the solution is straightforward: link your code with the oldest
version of libstdc++ that you wish to support. The same concept will
apply to glibc as well. In practice this means that your build machine
needs to have the lowest common denominator of gcc and glibc versions
that you intend to support.
Brian