[Qt-interest] LGPL and static linking

Frank Mertens frank at cyblogic.de
Thu Nov 26 00:07:37 CET 2009


Christian Dähn wrote:
>> Yeah regular QtScript, but they are changing backend to webkit 
>> javascript backend, which will get the berformance boost etc. and again 
>> commercial users no benefit
> 
> Exactly. I read it in the Qt Labs blog - that's why I'm so dissatisfied:
> http://labs.trolltech.com/blogs/2009/11/23/qtscript-in-46/
> 
> Further I'm deploying my apps at work as _static_ binaries under Linux -
> these are high performance industrial grade apps, where I have to
> ensure extremely short response times - long startup times aren't
> an option anyway. 
> 
> Between: The last 10 years I used Qt for private/opensource and 
> commercial projects, I got some serious problems deploying shared
> libs under Linux - while static apps were much easier to maintain
> and much more stable.
> 
> Just imagine which problems you get when using own compiles Qt
> versions with self made patches and just forget to set LD_LIBRARY_PATH -
> very nice :-)

On Linux there's a great tool called chrpath, which lets you
edit the rpath and runpath of your binary (check out the Debian package
repros), which lets you safely forget about LD_LIBRARY_PATH.
(I'm telling everybody who whines about dynamic linking;)

Secondly I can't buy that you have issues with load times of dynamic Qt
libs. If taking the configure flags carefully when building Qt it will
pop up like nothing, even if loaded dynamically from a cheap flash.
ld performance bugs have been fixed years ago!
Currently my Qt 4.5.2 is at 20 MB for QtCore + QtGui and it starts
in about a second or less (can't tell) on a class 6 SD card.

Maybe there is a problem with call indirection when using DSO's instead
of static linking. For me there is about a 30% performance gain
if linking my own libs statically and nobody keeps me from doing so,
even if Qt is linked dynamically.

Cheers,
Frank.




More information about the Qt-interest-old mailing list