Re: autopackage of qt

Eugene Zolenko <[email protected]> Tue, 11 Aug 2009 21:09:32 -0600
Newsgroups gmane.comp.autopackage.devel
Message-ID <[email protected]>
> Hi guys,
>
> Does anyone know if there is an autopackage of the Qt library available?  
> Nokia/Trolltech doesn't seem to make them, and a quick google doesn't reveal 
> anything.
>
> Until now I've been statically linking my own build of Qt.  What I'd like to 
> do now is create a dynamic build of Qt as its own .package file which I can 
> then put within my app's .package.  The primary goal here is to make it 
> possible to use the distribution's Qt if it already exists, otherwise my Qt 
> build would be installed.  Is this possible?  I seem to remember reading some 
> autopackage information that said it was.  Do I also need to write some test 
> program that probes for a compatible installed Qt?
>
>   
We install our own build of Qt (built with apbuild, plus some flags for 
plugins) as private libraries for our apps.

The problem with installing Qt system-wide is that it does not follow 
linux interface naming conventions.

Libraries are called for example
libQtCore.so.4.3.2
which is symlinked to its soname:
libQtCore.so.4

This is very bad because 4.2.x _is not_ binary compatible with 4.5.x. 
Interface version of the library is 4.3, not 4.

If you install your version system-wide it might kill all apps that were 
using older system copy. If none were -- you will be killed yourself 
instead as soon as user installs some.

They should have called the library libQtCore4.so.3 -- this is standard 
and this allows installing conflicting versions side by side. And they 
actually maintain ABI for all versions within one minor release (all 
4.4.x are compatible f.e.).

As it is, you must either build and link to distro's supplied Qt (since 
everything else uses it), or install your own copy privately if you 
distribute binaries. And make sure you force linker to look there first 
(rpath) -- you don't want user installing distro's Qt just to kill your 
app. And make sure to set proper rpath on Qt libs themselves, otherwise 
QtGui will go and load QtCore of wrong version and happily blow up :).

---------------------------------------------------------------------
To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected]
For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]