Exec. compatibility across Linux OS versions...

Exec. compatibility across Linux OS versions...

Post by Gopal Pate » Wed, 18 Jun 2003 16:15:06



Hi All,

I have a windows application ported on Red Hat Linux-7.1 compiled using
gcc-2.95 and Mainsoft's Visual MainWin 4.02 SP2.

Can my ported application work across RH7.1 or later, say RH8.0, RH9.0?

I have seen some applications developed on older versions of Linux and
working fine on later versions. Is it possible for me to do the same?, If
yes, what all it takes to make an application compatible across Linux OS
versions?

If possible, let me know, what all features can be made compatible, by
taking few cares in the source code?

Regards,
Gopal

 
 
 

Exec. compatibility across Linux OS versions...

Post by M?ns Rullg? » Wed, 18 Jun 2003 17:03:57



> I have a windows application ported on Red Hat Linux-7.1 compiled using
> gcc-2.95 and Mainsoft's Visual MainWin 4.02 SP2.

> Can my ported application work across RH7.1 or later, say RH8.0, RH9.0?

> I have seen some applications developed on older versions of Linux and
> working fine on later versions. Is it possible for me to do the same?, If
> yes, what all it takes to make an application compatible across Linux OS
> versions?

> If possible, let me know, what all features can be made compatible, by
> taking few cares in the source code?

You don't need to do anything special.  If all libraries your program
uses are present, it should work.  Just one thing: don't assume that
any files are in the same place on different systems.  Never hard-code
file names into the code, find them at run time using environment
variables, or at least make searched locations configurable at compile
time.

The difference between releases of redhat, or any other distribution,
is the versions of libraries included.  If your program depends on
some particular version, or uses some obscure library, it might have
to be installed separately.  Having several versions of the same
library installed is generally not a problem.

--
M?ns Rullg?rd


 
 
 

Exec. compatibility across Linux OS versions...

Post by Gopal Pate » Thu, 19 Jun 2003 16:41:00


Hi M?ns Rullg?rd,

If I understood you correctly, as long as I do have all the
binaries/libraries available on my platform, may it be RH6.2, RH7.1, RH8.0
or RH9.0 and If I have taken proper care while coding (no hardcoding), my
executable should work fine.

FYI, I am using a third party support for porting my windows application to
RH Linux. Now the tools supports RH6.2 and RH7.1 (as per the documentation).
If the binaries/libraries for the third party tool are not version
dependent, I should not face any compatibility problem? Right???

Pl. let me know, if you have anything to add.

Thanks for your help.
Gopal.

----- Original Message -----

Newsgroups: comp.os.linux.development.apps
Sent: Tuesday, June 17, 2003 1:33 PM
Subject: Re: Exec. compatibility across Linux OS versions...


> > I have a windows application ported on Red Hat Linux-7.1 compiled using
> > gcc-2.95 and Mainsoft's Visual MainWin 4.02 SP2.

> > Can my ported application work across RH7.1 or later, say RH8.0, RH9.0?

> > I have seen some applications developed on older versions of Linux and
> > working fine on later versions. Is it possible for me to do the same?,
If
> > yes, what all it takes to make an application compatible across Linux OS
> > versions?

> > If possible, let me know, what all features can be made compatible, by
> > taking few cares in the source code?

> You don't need to do anything special.  If all libraries your program
> uses are present, it should work.  Just one thing: don't assume that
> any files are in the same place on different systems.  Never hard-code
> file names into the code, find them at run time using environment
> variables, or at least make searched locations configurable at compile
> time.

> The difference between releases of redhat, or any other distribution,
> is the versions of libraries included.  If your program depends on
> some particular version, or uses some obscure library, it might have
> to be installed separately.  Having several versions of the same
> library installed is generally not a problem.

> --
> M?ns Rullg?rd


 
 
 

Exec. compatibility across Linux OS versions...

Post by Paul Pluzhniko » Fri, 20 Jun 2003 00:02:51


[Please do not top-post].

Quote:> If I understood you correctly, as long as I do have all the
> binaries/libraries available on my platform, may it be RH6.2, RH7.1, RH8.0
> or RH9.0 and If I have taken proper care while coding (no hardcoding), my
> executable should work fine.

In theory.

In practice this may not work on RH9.0. See this thread for example:
http://www.google.com/groups?threadm=uznkqsjc2.fsfYB8X%40earthlink.net

Quote:> FYI, I am using a third party support for porting my windows application to
> RH Linux. Now the tools supports RH6.2 and RH7.1 (as per the documentation).
> If the binaries/libraries for the third party tool are not version
> dependent, I should not face any compatibility problem? Right???

In my limited experience with MainWin, their libraries have
significant low-level dependencies on glibc/libpthread, and chances
of your exe working on RH9.0 are pretty slim.

Why don't you just try running on RH9.0 a trivial test case built
on RH6.2 and answer your own question?

Cheers,
--
In order to understand recursion you must first understand recursion.