This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Resolving incompatibility in libc.
- From: llewelly at xmission dot com
- To: Amit Bhatia <abhatia_iitk at yahoo dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 26 Apr 2004 14:20:20 -0600
- Subject: Re: Resolving incompatibility in libc.
- References: <20040426195738.33660.qmail@web14303.mail.yahoo.com>
Amit Bhatia <abhatia_iitk@yahoo.com> writes:
> Hello All.
> I am sorry to post this query on the possibly wrong
> list. But I think some of you might be aware of how to
> resolve it hence..
>
> I have a c++ code executable that has been compiled
> using g++ 2.95.3 that comes with Mandrake 7.1.
> I am using redhat 9.0 with gcc 3.2 and hence a
> different version of libc as well.
> I don't have the source code. All I have is the
> executable.
> As soon as I try to run this executable, it gives
> segmentation fault.
>
> Does any one know how to bypass this problem. I can't
> get the source code.
> Hence recompiling it is ruled out.
[snip]
The g++ 2.95.x and 3.2.x libstdc++ librares are not binary compatible.
You must get a shared binary libstdc++ built from gcc 2.95.3, and
install it somewhere where your dynamci linker will find it.
One way to do this would be to downloaded and build gcc 2.95.3 from
source, and put its lib directory in your LD_LIBRARY_PATH.
Make sure you build 2.95.3 with a different prefix than 3.2 uses.