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

David Faure faure at kde.org
Tue Oct 17 15:32:02 CEST 2006


On Tuesday 17 October 2006 15:08, Thiago Macieira wrote:
> David Faure wrote:
> >On Tuesday 17 October 2006 14:20, Thiago Macieira wrote:
> >> David Faure wrote:
> >> >How can we fix KDELibsDependencies.cmake to also include indirect
> >> > dependencies?
> >>
> >> We shouldn't. Why should we care whether Qt links to Xrender? Or if
> >> libxslt uses libexpat?
> >
> >Well, see the message I was replying to - if things don't link on Mac OS
> > because kdecore is only implicitly linking to qtnetwork then we are
> > going to always have link trouble on Mac OS when it all works fine on
> > Linux... But I see your point. Hmm. No solution?
> 
> What was the original problem?
> 
> Any application should list in CMake all its direct dependencies and only 
> them. KDECore doesn't use QtNetwork directly (though I probably will make 
> it use because of QNetworkInterface). And it doesn't fail linking.
> 
> So, why does kio_smtp fail linking? Does it use QtNetwork?
Yes. interactivesmtpserver.cc:#include <QtNetwork/QTcpSocket>

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).
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.
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.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list