KJSEmbed removal part 2

Thiago Macieira thiago at kde.org
Wed Jul 25 20:42:26 BST 2007


Leo Savernik wrote:
>Am Mittwoch, 25. Juli 2007 schrieb Alex Merry:
>> I think it depends on the linking method.  We stop applications
>> linking directly to libkjsembed, fine.  However, libfoo in kdelibs
>> links to libkjsembed.

That's correct. Except there is only one linking method.

>> When linking an application that uses libfoo, the linker can (as I
>> understand it) do one of two things.

Nope. It can only do the first option you listed.

>> It can just link to libfoo, and let the loader deal with the
>> dependencies.  In this case, if libfoo is updated to not depend on
>> libkjsembed and libkjsembed is removed, the application no longer
>> depends on libfoo (because when the loader looks through the
>> dependencies of libfoo, libkjsembed is no longer listed).
>>
>> However, the linker can also link the application directly to libfoo
>> and all its dependencies (which is one things that .la files are used
>> for), including libkjsembed.  In this case the loader will see
>> libkjsembed in the dependencies of the application, regardless of the
>> dependencies of libfoo, and will bail out if it can't be found.

This second option is not valid. The linker can only link to the libraries 
you give it with the -l option.

Which is where the .la file comes in: it tells libtool what libraries to 
link to. And that's where -lkjsembed must not appear, or applications 
will link to kjsembed directly, even though they don't need to and they 
shouldn't.

>Makes sense. So actually direct kjsembed linkage outside of kdelibs is
>forbidden for KDE 4.0? Then the issue I mentioned is void.

Yes.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070725/802e98c4/attachment.sig>


More information about the kde-core-devel mailing list