Re: "portable" applications



John Zavgren wrote:
My intuition tells me that there must be a better way to build an
application that will run on more than one Linux machine.

Is there a simple way to statically link the esoteric aspects of my GUI

You can use the "ldd" command to see what your binary is linking to.
The biggest problem you will run into is that your version of GTK may be
newer than the version of GTK on the machines you are trying to target.
 For example RHEL 5 probably is about a year or more behind Ubuntu in
terms of GTK version.  That said, GTK is supposed to be ABI stable for
the entire 2.x series.  In other words as long as you don't use an API
that was introduced along the line, it should run fine with older
libraries.  In practice it may not always work.  What most companies do
that distribute GTK-based software is to ship the GTK runtime libraries
with their app and using a script fall back to them (using the
LD_LIBRARY_PATH environment variable) when the system GTK will not
suffice.  However to make that work well you have to make sure you're
not trying to link against a version of GLIBC that is newer than the
target OS.

I think, however, that your best bet is to give your coworkers the
tarball and have them do a "./configure ; make ; make install".  With
source code available, that is the easiest, best, and most portable way.

So to summarize, the things you have to worry about are:
- target GLIBC version
- target GTK2 version
- target architecture (32-bit vs 64-bit)





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