Reducing excess linkage - cmake 2.6 IMPORTED targets and LINK_INTERFACE_LIBRARIES for kdelibs

Alexander Neundorf neundorf at kde.org
Tue Jun 24 21:24:52 CEST 2008


On Thursday 19 June 2008, Alexander Neundorf wrote:
> Hi,
>
> On Wednesday 11 June 2008, Alexander Neundorf wrote:
> > On Tuesday 03 June 2008, Alexander Neundorf wrote:
> > > On Thursday 29 May 2008, Dirk Mueller wrote:
> > > ...
> > >
> > > > All fine for me, go ahead. I can help with fixing/testing it somewhen
> > > > end of next week.
> > >
> > > Ok, done.
> > >
> > > On Tuesday 03 June 2008, Modestas Vainius wrote:
> > > > Hi,
> > > >
> > > > Tuesday 03 June 2008, jūs rašėte:
> > > > > As discussed with Dirk, make the link interface empty by default,
> > > > > i.e. by default apps linking to libfoo won't be linked to the libs
> > > > > libfoo.so links against too anymore.
> > > >
> > > > Are you aware that we at Debian have already done this but to a
> > > > lesser extent?
> > >
> > > Yes.
> > >
> > > > (resetting all LINK_INTERFACE_LIBRARIES to empty is too drastic,
> > > > imho).
> > >
> > > Setting them empty by default is the conclusion from my discussion with
> > > Dirk at LinuxTag.
>
> attached you can find a patch which reduces the "link interfaces" of the
> libs from kdelibs significantly.
> I am able to build kdelibs this way.
> I guess all other modules break, i.e. won't link. I don't have the time and
> computing power to fix this for all modules, so your help is needed here.
>
> Please apply the attached patch to kdelibs and enable the option
> KDE4_ENABLE_EXPERIMENTAL_LIB_EXPORT.
> Then the dependencies in KDELibsDependencies.cmake will look like this:
> SET("dummy_LIB_DEPENDS" "")
> SET("kde3support_LIB_DEPENDS"
> "kio;kdeui;kdecore;/opt/qt-copy/lib/libQt3Support.so")
> SET("kdecore_LIB_DEPENDS"
> "/opt/qt-copy/lib/libQtDBus.so;/opt/qt-copy/lib/libQtCore.so;-lpthread")
> SET("kdefakes_LIB_DEPENDS" "")
> SET("kdesu_LIB_DEPENDS" "")
> SET("kdeui_LIB_DEPENDS"
> "kdecore;/opt/qt-copy/lib/libQtSvg.so;/opt/qt-copy/lib/libQtGui.so")
> SET("kdnssd_LIB_DEPENDS" "")
> SET("kfile_LIB_DEPENDS" "kio;kdeui;kdecore")
> SET("khtml_LIB_DEPENDS" "kparts;kjs;kio;kdeui;kdecore")
> SET("kimproxy_LIB_DEPENDS" "")
> SET("kio_LIB_DEPENDS"
> "kdeui;kdecore;/opt/qt-copy/lib/libQtNetwork.so;/opt/qt-copy/lib/libQtXml.s
>o") SET("kjs_LIB_DEPENDS" "")
> SET("kjsapi_LIB_DEPENDS" "")
> SET("kjsembed_LIB_DEPENDS" "")
> SET("kmediaplayer_LIB_DEPENDS" "")
> SET("knewstuff2_LIB_DEPENDS" "")
> SET("knotifyconfig_LIB_DEPENDS" "")
> SET("kntlm_LIB_DEPENDS" "")
> SET("kparts_LIB_DEPENDS" "kio;kdeui;kdecore")
> SET("kpty_LIB_DEPENDS" "")
> SET("krosscore_LIB_DEPENDS"
> "kdecore;/opt/qt-copy/lib/libQtScript.so;/opt/qt-copy/lib/libQtXml.so")
> SET("krossqtsplugin_LIB_DEPENDS" "")
> SET("krossui_LIB_DEPENDS" "krosscore")
> SET("ktexteditor_LIB_DEPENDS" "")
> SET("kunittest_LIB_DEPENDS" "")
> SET("kutils_LIB_DEPENDS" "")
> SET("kwalletbackend_LIB_DEPENDS" "")
> SET("solid_LIB_DEPENDS" "")
> SET("threadweaver_LIB_DEPENDS" "")
>
> i.e. almost empty. I don't know if these settings are ideal. There were a
> lot of undefined references to X stuff in targets which linked to kdeui, so
> maybe X11_LIBRARIES should be added to the link interface of kdeui.
> There were also several errors with undefined references to libz functions
> in targets which link to kio, so maybe libz should be added to the kio link
> interface.
> What do you think ?
>
> To the debian packagers: please use a clean kdelibs from svn and build with
> this patch. It should do what you want. I really strongly suggest that you
> stay as close to svn as possible.
>
> Once applied, all other modules have to be built and where required the
> missing libraries to the TARGET_LINK_LIBRARIES() commands have to be added.
> If that works, and the release time agrees, this has to be committed all at
> once at a monday.

After you pushed so much, is there now actually any interest in this ?
The release is in more or less one month, so it is really getting late...
I need your feedback and work to get this integrated into svn.

Alex




More information about the Kde-buildsystem mailing list