Reducing library dependancies

Dirk Mueller mueller at
Tue Aug 5 19:17:48 BST 2008

On Monday 04 August 2008, Thiago Macieira wrote:

> It's an indirect dependency only because QtDBus uses it. But since it
> doesn't expose that in the API, I have a task to rewrite the parser to
> QXmlStreamReader (which is in QtCore).

Thats a good idea. 

> Also, I don't see libexpat in my kdeui's ldd. Does fontconfig dynamically
> load it?

no. I guess you use mandriva ;), because they build fontconfig with libxml2. 
openSUSE builds with expat, because it is generally the much smaller 
dependency (150kb of code, ~ factor 2 faster parsing vs. 1.4MB of code, and 
factor 2 more slowness). 

> /usr/lib/ 3196 relocations, 3108 relative (97%), 142 PLT
> entries, 45 for local syms (31%), 0 users
> That's 86 non-relative relocations and 45 functions calls that would be
> pruned with -Bsymbolic-functions.

yeah, not a lot, I agree, but those are comparatively expensive. of course it 
would even be better if the unconditional libxml2 dependency (via 
strigianalyzer library) wouldn't be there in the first place. 

> 15390 relocations, 5801 relative (37%), 2591 PLT entries, 0
> for local syms (0%), 0 users

so you build with Bsymbolic-functions already?

15390 relocations, 3626 relative (23%), 5132 PLT entries, 2549 for local syms 
(49%), 0 users

thats how it roughly looks without it. 

> 1079 relocations, 853 relative (79%), 651 PLT entries, 519 for
> local syms (79%), 0 users

Another offender, but its a C library, so people would be unhappy over -

> Another fact: of the 64828 relocations, 42100 are relative. Of the 22k that
> aren't relative, 10k come from libkdeui.

Which we can't get rid of unless the lazy vtable initialisation patch from 
Michael Meeks fineally gets upstream. 


More information about the kde-core-devel mailing list