[Qt-interest] binaries in Ubuntu versions

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Mon Dec 1 12:32:13 CET 2008


Deepak Chandran wrote on Monday, December 01, 2008 4:27 AM:

> I have a Qt application (cross-platform obviously) that I want people
> to be able to install without too much trouble. Different versions of
> Ubuntu are not binary compatible with each other,

I do use (K)Ubuntu myself privately, but I don't know much about "binary compatibility" (when it comes to the C++ libraries etc.), but so much for sure:

Qt *is* binary compatible, so when you link your app against an old Qt library, say 4.2.x, it should still run with a newer Qt 4.4.3 for example.

That said, the only problem you'd have (with /any/ Linux distribution, that is) are the other libraries (such as the aforementioned C/C++ libraries) your app depends on.

So your best bet would be to try to build/link your application on the oldest Ubuntu distribution you want to support and hope that the following distributions are at least "upward compatible" (or was it the other way, "downward compatible"? I always confuse these two terms ;), that is that your "old" binary still runs on newer Ubuntu distributions.

I know that at least the SuSE distribution once installed (optionally) "compatibility" C/C++ libraries, as to support older binaries, but that's a long time ago (I think between SuSE 5.x and 6.x).

I don't know how recent distributions solve the "binary compatibility" problem these days. In the worst case you'd have to offer a separate binary for each "distribution compatibility group" (your app runs on distribution versions A-C, D-E, F-H, etc.)

> so I cannot make a
> single binary that would run in all the Ubuntu versions.

Again, try to build on the "oldest" supportable Ubuntu version and see if your binary still runs on newer versions.

> In order to
> build the application from the source, the users would need to
> download Qt (which is huge).

Qt is not the problem here, it *is* binary compatible. Off course your users would have at least to have the appropriate Qt *.deb package installed (Ubuntu /does/ offer Qt as package as well!), and if you really have to make your users compile then they can also easily install the "developer Qt package" (which simply includes the nessesary headers and tools such as moc, uic).

> Is there a simple solution to this
> problem? I just want a way to make binaries for different Ubuntu
> systems without users having to download Qt.

Your users have to have Qt installed anyway, and best practice is to use the Qt version made available from Ubuntu. Create a *.deb package and add Qt to the prerequisites.

Hope that gives you some ideas,
  Oliver




More information about the Qt-interest-old mailing list