KDELibsDependencies.cmake problem (Re: KDE/kdebase/runtime/kioslave/smtp)

Thiago Macieira thiago at kde.org
Tue Oct 17 20:13:22 CEST 2006


David Faure wrote:
>I understand what you're saying - if it uses QtNetwork it should link
> directly to it and not via kdecore. I agree with this, conceptually.
>
>But the practical problem is that on Linux it all links just fine via
> kdecore, so the developers will never remember to add such explicit
> links, since it "works for them" (tm).

That's no excuse. If you use a QtNetwork/ header, you must link to 
QtNetwork. It's really simple, especially since Qt is nice enough to put 
the headers in different places.

Also note that the indirect linkage on Linux would eventually break when 
we get rid of Qt3Support in kdecore. The same goes for any indirect 
library that is not part of the API: we can rightfully change our 
dependencies without breaking Binary Compatibility.

So, it's no excuse for not linking to your direct dependencies.

> So the guys doing Mac OS (and 
> maybe Windows) porting will keep having to fix up CMakeLists to add
> explicit linking afterwards - which breaks the idea of a cross-platform
> build system IMHO; we should ensure that when it works somewhere it
> works everywhere as much as possible.

Like I said, it's also broken on ELF platforms too. It's just more 
difficult to notice.

So I consider a good thing that the Mac and Windows developers will notice 
the problem and fix the Linux people's bugs.

>Either by making the automatic resolving of dependencies available
> everywhere, or by turning it off on linux (i.e. on all ELF systems, I
> guess this means), but I don't know if that's possible.

I can't see any option to do that with ld.

We could accomplish it with an LSB-build-env-style library. That is, 
create a copy of libkdecore that has only dummy symbols (i.e., no code, 
etc.) and doesn't link to anything.

That way, if we forget to link to a required library, linking will fail.

-- 
  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: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20061017/f59f052b/attachment.pgp 


More information about the Kde-buildsystem mailing list