Split building

Alexander Neundorf neundorf at kde.org
Mon Jan 7 19:23:56 CET 2008


On Monday 07 January 2008, Piotr Jaroszyński wrote:
> On Monday 07 of January 2008 19:01:45 Alexander Neundorf wrote:
...
> > So it should also in this case link against the installed libkonq.so.
> > Shouldn't that work ?
>
> I thought so too, but I think -Wl,--no-undefined makes it fail (it seems to
> only check direct deps for symbols). See the command line below.

Hmm, yes.

> > Can you please post the complete link command ?
>
> /usr/lib64/ccache/bin/x86_64-pc-linux-gnu-g++  -fPIC -O2 -march=athlon64
> -pipe  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align
> -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security
> -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual
> -fvisibility=hidden -fvisibility-inlines-hidden -O2 -DNDEBUG -DQT_NO_DEBUG
> -Wl,--enable-new-dtags -Wl,--fatal-warnings -Wl,--no-undefined -lc  -shared
> -Wl,-soname,kcm_useraccount.so -o ../../../lib/kcm_useraccount.so
> "CMakeFiles/kcm_useraccount.dir/kcm_useraccount_automoc.o"
> "CMakeFiles/kcm_useraccount.dir/chfnprocess.o"
> "CMakeFiles/kcm_useraccount.dir/main.o"
> "CMakeFiles/kcm_useraccount.dir/chfacedlg.o"
> "CMakeFiles/kcm_useraccount.dir/settings.o" -L/usr/lib64/qt4
> -L/usr/kde/4.0/lib64 -L/lib64 -lkonq -lQtCore -lpthread -lkdecore -lkpty
> -lkdesu -lkdecore -lQtCore -lpthread -lQtNetwork -lQtDBus -lQtXml -lz -lbz2
> -lresolv -lutil -lutempter
> -Wl,-rpath,/usr/lib64/qt4:/usr/kde/4.0/lib64:/lib64
>
> > > Can you think of any nice solution to this problem? I have only thought
> > > of keeping a map of deps like konq -> ${QT_QTXML_LIBRARY}
> > > ${KDE4_KPARTS_LIBS} and sed'ing all the CMakelists, but tbh I don't
> > > know CMake too well.
> >
> > No, please let's find a solution and not go with a hack.
> > Even if the link command above would work (base "konq" should be
> > interpreted as a lib), it would be more or less by accident.
>
> Agreed, I would prefer something sensible too.

:-)

> > If we can't rely on the fact that the target "konq" exists, then we
> > should use something ${KONQ_LIBRARY} and set this accordingly.
>
> Sounds like an idea.

This will be some work. It means that developers must not use the target names 
anymore when linking to libraries :-/

Would it be an option for you to always also check out the library directories 
so that these targets exist ?

Would it be an option for you to checkout everything but enable only the 
application you're interested in ?
This would mean you would have a switch BUILD_KFOO for each app, which you 
could enable as you want. Libs would be always enabled.

It may be possible to do something with export_library_dependencies(), so you 
may be able to preload some stuff into cmake so it can deal with the unknown 
lib, I have to check...

...
> > Are there also other problems ?
>
> Not that I know of.

Ok.

Alex





More information about the Kde-buildsystem mailing list