Libtool & libraries

Thiago Macieira thiago.macieira at kdemail.net
Sun May 23 20:54:06 BST 2004


Szombathelyi György wrote:
>I've just curious about the following issue:
>Why every program/library linked to all of the libraries which the
> prog/lib indirectly depends on?
>An example:
>If I build kdelibs with fam support, then libkio will linked against
> libfam. But why all other kde programs, that linked against libkio is
> linked against libfam? Now Fedora Core2 is supplied with selinux, and
> fam is linked with libselinux. And what happens? _Every_ kde program
> is linked against libselinux. Now if some wants to distribute binary
> version of his kde program, it's very hard to do it in a fairly
> portable way.
>As I looked into the building process, libtool links a program to all
>dependency_libs in the .la files. Is this a wanted or unwanted side
> effect of libtool?
>Sorry if this question is too dump/trivial, but I really can't find
> out why all of the kde programs is linked against libpng, libz,
> libXrender, libfam, libselinux and other libraries which is not even
> referenced in these applications.

I agree with your point. But you should blame libtool.

ELF platforms can work the way you are describing -- by just linking to 
the libraries you really need. But I'm guessing other platforms, 
especially static ones, can't.

In the end, this is a question you should be posing to to the libtool 
developers.

-- 
  Thiago Macieira  -  Registered Linux user #65028
   thiago (AT) macieira (DOT) info
    ICQ UIN: 1967141   PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040523/f650567b/attachment.sig>


More information about the kde-core-devel mailing list