Re: "portable" applications




Date: Wed, 24 Jun 2009 08:41:50 -0400
From: John Zavgren <john zavgren com>
Subject: "portable" applications
To: gtk-app-devel-list gnome org
Message-ID:
        <8bea388a0906240541p1bc747c7x174a9b35828b55d4 mail gmail com>
Content-Type: text/plain; charset=ISO-8859-1

Greetings:
I wrote a Glade-3/GTK2/G++ application on a ubuntu machine, and the
application works great. In fact it works so well that my colleagues want to
use it. Ujnfortunately, they are not using ubuntu (and neither was I until I
started developing my GUI. I chose ubuntu because it seemed to support GUI
development.)

I tried running my app on a Red Hat machine and the app failed because of an
unresolved external reference,,, missing shared object file.

No big deal. I attempted to statically link my app with the assistance of
"strace", the doctrinaire approach with embedded systems. That opened
pandoras box! The number of references to shared object files was
astounding.
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


Another approach you could take is to figure out how to make a .deb and .rpm files that list the packages for the libraries your app needs as dependencies. Not exactly the same thing you are talking about, but very much related. I wish I could speak from experience, but this is still on my mental to-do list.

It is a sign of progress when someone uses "portable" to mean support for more than one linux distro. I would not recommend statically linking gtk. Most of the trick here is 1) portable build system (I endorse SCons), and 2) configuring / installing the required pieces on a "build box" for a "supported" target. Actually, if you get that far, the .deb / .rpm is not required, but a nice finishing touch.

Binary portability is somewhat of a hot-button issue for many people now. It's not really a strong point for Linux. Sure it would be nice, but it's better to not require/expect its availability. For instance, there will always be different CPU architectures. Or if you are like many in my boat, you also still have windows builds.


--
www.thomasstover.com




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