[Top][All Lists]

[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 09:46:37 -0600
User-agent: slrn/ (Linux)

Paul, thanks a lot, I will try approach [1] first. It will take ma few
hours as I need to recompile a lot of stuff on a busy obsolete
computer. I will post an update. Thank you.,


On Wed, 31 Jan 2007 07:26:27 -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 and 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 and 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]