help-gplusplus
[Top][All Lists]
Advanced

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

Re: BUG -- Apps made on FC5 (GCC 4.1.1) do NOT run on FC3 (GCC 4.0.2)


From: Ignoramus20785
Subject: Re: BUG -- Apps made on FC5 (GCC 4.1.1) do NOT run on FC3 (GCC 4.0.2)
Date: Wed, 31 Jan 2007 13:48:24 -0600
User-agent: slrn/0.9.8.1pl1 (Linux)

Paul, 

I tried your suggestion. It did remove dependency on libstdc++. Which
is great. Thank you. 

However, it looks like we have one more issue: all of our shared
libraries that we build from our code (that come with the executable
in question) have references to function _Unwind_GetIPInfo. That
function, in turn, requires GCC_4.2.0.

See below. 

Is there something that we can do to not call that _Unwind_GetIPInfo?

Thanks!!!

00000000       F *UND*  0000000b              _Unwind_GetTextRelBase@@GCC_3.0
00000000       F *UND*  00000019              _Unwind_GetIPInfo@@GCC_4.2.0
00000000       F *UND*  00000063              _Unwind_SetGR@@GCC_3.0
00000000       F *UND*  000000f9              _Unwind_Resume_or_Rethrow@@GCC_3.3
00000000       F *UND*  0000000b              
_Unwind_GetLanguageSpecificData@@GCC_3.0
00000000       F *UND*  0000000b              _Unwind_GetRegionStart@@GCC_3.0
00000000       F *UND*  0000000e              _Unwind_SetIP@@GCC_3.0
00000000       F *UND*  00000197              _Unwind_RaiseException@@GCC_3.0
00000000       F *UND*  0000000b              _Unwind_GetDataRelBase@@GCC_3.0
00000000       F *UND*  0000001f              _Unwind_DeleteException@@GCC_3.0
00000000       F *UND*  000000e9              _Unwind_Resume@@GCC_3.0
00000000      DF *UND*  0000000b  GCC_3.0     _Unwind_GetTextRelBase
00000000      DF *UND*  00000019  GCC_4.2.0   _Unwind_GetIPInfo
00000000      DF *UND*  00000063  GCC_3.0     _Unwind_SetGR
00000000      DF *UND*  000000f9  GCC_3.3     _Unwind_Resume_or_Rethrow
00000000      DF *UND*  0000000b  GCC_3.0     _Unwind_GetLanguageSpecificData
00000000      DF *UND*  0000000b  GCC_3.0     _Unwind_GetRegionStart
00000000      DF *UND*  0000000e  GCC_3.0     _Unwind_SetIP
00000000      DF *UND*  00000197  GCC_3.0     _Unwind_RaiseException
00000000      DF *UND*  0000000b  GCC_3.0     _Unwind_GetDataRelBase
00000000      DF *UND*  0000001f  GCC_3.0     _Unwind_DeleteException
00000000      DF *UND*  000000e9  GCC_3.0     _Unwind_Resume


On Wed, Jan 31, 2007 at 07:26:27AM -0800, Paul Pluzhnikov wrote:
> Ignoramus20785 <ignoramus20785@NOSPAM.20785.invalid> writes:
> 
> > We have an app that we compile on FC5 (Fedora Core 5) using g++ from
> > GCC 4.1.1.
> >
> > When we copy our app to a FC3 server, to run it, we get this error: 
> 
> This is expected.
> 
> Unlike Win32, UNIX systems generally support *only* backward
> compatibility: programs compiled on an older system continue to run
> on a newer one (i.e. compile on FC3, run on FC5, and it will work).
> 
> > What can I do to get C++ apps compiled on FC5 to run on FC3?
> 
> The answer is: compile on the lowest OS release instead.
> 
> If there is a good reason why you can't, then you have to get rid
> of libstdc++.so.6 and libgcc_s.so.1 dependency [1], or you have to
> arrange for FC5 libraries to be used on the FC3 system [2].
> 
> For [1], do this:
> 
>   ln -sf $(g++ --print-file-name=libstdc++.a) .
>   g++ -static-libgcc -o exe main.o ... -L.
>   rm libstdc++.a
> 
>   # exe now has libgcc.a and libstdc++.a statically linked in.
> 
> For [2], do this:
> 
>   g++ -o exe main.o ... -Wl,-rpath='$ORIGIN'
> 
> Now copy 'exe' and libgcc_s.so.1 and libstdc++.so.6 into the same
> directory on FC3.
> 
> Note that either solution may work, but is not at all guaranteed
> to work.
> 
> Also, a slight modification to source may break it again -- there
> are symbols in FC5 libc, which are not present in FC3 libc, and if
> you introduce any code that depends on these, you are screwed.
> 
> 



reply via email to

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