[ANNOUNCE] automoc4 from kdesupport now supported for building KDE
Alexander Neundorf
neundorf at kde.org
Mon May 19 00:18:30 CEST 2008
On Sunday 18 May 2008, Matthias Kretz wrote:
> On Saturday 17 May 2008, Andras Mantia wrote:
> > On Sunday 11 May 2008 00:58:38 Alexander Neundorf wrote:
> > > If you experience any problems with automoc, please let us know at
> > > kde-buildsystem at kde.org (or here).
> >
> > Here is a problem: kdebase fails to build if there are some older
> > include/solid/control/ifaces around.
> > The error is:
> > cd
> > /data/development/build/kde-trunk/kdebase/workspace/solid/networkmanager-
> >0. 7 && /opt/kde4/bin/automoc4
> > /data/development/build/kde-trunk/kdebase/workspace/solid/networkmanager-
> >0. 7/solid_networkmanager07_automoc.cpp
> > /data/development/sources/kde-trunk/kdebase/workspace/solid/networkmanage
> >r- 0.7
> > /data/development/build/kde-trunk/kdebase/workspace/solid/networkmanager-
> >0. 7 /opt/qt4/bin/moc [....]
> > Generating
> > /data/development/build/kde-trunk/kdebase/workspace/solid/networkmanager-
> >0. 7/networkinterface.moc from
> > /data/development/sources/kde-trunk/kdebase/workspace/solid/networkmanage
> >r- 0.7/networkinterface.h
> > /data/development/sources/kde-trunk/kdebase/workspace/solid/networkmanage
> >r- 0.7/manager.h:35: Error: Undefined interface
> > [...]
> > automoc4: process
> > for
> > /data/development/build/kde-trunk/kdebase/workspace/solid/networkmanager-
> >0. 7/manager.moc failed: Unknown error
> > pid to wait for: 0
> > processes in queue: 11
> >
> >
> > The problem is this line in manager.h:
> > #include <solid/control/ifaces/networkmanager.h>
> >
> > This picks up the installed networkmanager.h instead of the one from
> > kdebase/workspace/libs/solid/control/ifaces .
> >
> > I tried to add
> > ${CMAKE_SOURCE_DIR}/workspace/libs
> > to the include_directories, but seems that this is ignored or searched
> > after the system path.
> >
> > So the solution to build kdebase is to remove your installed version and
> > build again.This also does not work if e.g you have KDE 4.0.x installed
> > in /usr like it is on openSUSE. So you have to:
> > - remove the old files (e.g from /opt/kde4/include if KDE trunk was
> > installed there)
> > - build AND install kdebase/workspace/libs/solid (so the correct headers
> > are installed to /opt/kde4)
> > - build now kdebase/workspace/solid
> >
> > I find this behavior broken, automoc4 should find the header files that
> > are in kdebase/workspace/libs/solid/control/ifaces as specified by the
> > include_directory command.
>
> automoc4 uses the include directories as specified by include_directory. At
> least that's what I wrote and expect the code to do. :-)
>
> Take a look at the generated <target>_automoc.cpp.files file. Its second
> line contains all the include directories as they'll get passed to moc.
> This line gets generated by the configure_files call in Automoc4.cmake.
CMake sorts the include dirs internally, so that in-project include dirs are
always before out-of-project include dirs.
(if CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE is true, done in
kdelibs/cmake/modules/KDE4Defaults.cmake)
Maybe this has to be added for automoc ?
Alex
More information about the Kde-buildsystem
mailing list