Reducing library dependancies

Dirk Mueller mueller at
Mon Aug 4 14:59:12 BST 2008

On Sunday 03 August 2008, trigger at wrote:

> In Debian we compile all the KDE 4 stuff with --as-needed (and
> --no-undefined  to make sure there are no undefined symbols). We didn't
> encounter any problems so far.
> For sure this is more or less a hack, because in an ideal world there are
> no unneeded libraries one tries to link against...

it would be interesting to know which dependencies this special build actually 
detects as "unneeded". With the link reduction stuff in trunk, it should be 
ideally none. 

I've noticed that a couple of objects link kde3support while they actually 
only need to link qt3support (and similar). There are also apps that can be 
fixed in trivial amount of time to not need any qt3support at all. 

It also reminds me that almost everything links against kio for (little) 
reason. KIO is an extremely huge dependency. It pulls in 3 different XML 
readers alone (QtXml for some kdecore stuff, libxml2 for strigi support (which 
is only needed optionally in one kio class, and expat for fontconfig parsing 
(because kio depends on kdeui for historic reasons). libxml2 is a big 
dependency, it has a lot of relocations against internal symbols (-Bsymbic-
functions would help with that but not every distribution builds with it). 

Getting our dependencies straightened out and using symbolic-functions will 
help a lot more with startup time than -Wl,-as-needed (which is mostly a noop 
now with the link reduction in /trunk). 


More information about the kde-core-devel mailing list