MantisBT - CMake
View Issue Details
0013762CMakeCMakepublic2012-11-30 08:502013-03-10 17:34
Michael Palimaka 
Alex Neundorf 
normalmajoralways
closedfixed 
CMake 2.8.10.2 
 
0013762: Automoc still fails to handle Q_INTERFACES
Automoc is still failing in 2.8.10.2, but this time with phonon-vlc master. It still works fine in 2.8.9

AUTOMOC: error: process for /var/tmp/portage/media-libs/phonon-vlc-9999/work/phonon-vlc-9999_build/src/moc_audiodataoutput.cpp failed:
/var/tmp/portage/media-libs/phonon-vlc-9999/work/phonon-backend-vlc-9999/src/audio/audiodataoutput.h:62: Error: Undefined interface
Clone and build git://anongit.kde.org/phonon-vlc.git [^]
No tags attached.
related to 0013667closed Alex Neundorf Automoc fails to handle Q_INTERFACES 
has duplicate 0013995closed Alex Neundorf Builtin automoc doesn't automatically include system include path. 
Issue History
2012-11-30 08:50Michael PalimakaNew Issue
2012-12-03 12:15Alex NeundorfAssigned To => Alex Neundorf
2012-12-03 12:15Alex NeundorfStatusnew => assigned
2012-12-03 12:55Alex NeundorfNote Added: 0031819
2012-12-03 12:59Alex NeundorfNote Added: 0031820
2012-12-07 15:25Alex NeundorfRelationship addedrelated to 0013667
2012-12-07 15:27Alex NeundorfNote Added: 0031853
2012-12-08 09:22Michael PalimakaNote Added: 0031856
2012-12-08 11:59Alex NeundorfNote Added: 0031857
2012-12-08 11:59Alex NeundorfStatusassigned => closed
2012-12-08 11:59Alex NeundorfResolutionopen => fixed
2013-03-10 17:34Alex NeundorfRelationship addedhas duplicate 0013995

Notes
(0031819)
Alex Neundorf   
2012-12-03 12:55   
Bernd wrote:

The problem is that automoc seems to strip "/usr/include". If I manually add
something like "/usr/include/banana" it shows up, but /usr/include not.

I need /usr/include as phonon is located there (/usr/include/phonon/*.h)


======
here the output with
   include_directories(
          ${CMAKE_CURRENT_BINARY_DIR}
          ${GSTREAMER_INCLUDE_DIR}
          ${GSTREAMER_PLUGIN_VIDEO_INCLUDE_DIR}
          ${GSTREAMER_PLUGIN_AUDIO_INCLUDE_DIR}
          ${GSTREAMER_PLUGIN_PBUTILS_INCLUDE_DIR}
          ${GLIB2_INCLUDE_DIR}
          ${LIBXML2_INCLUDE_DIR} ${X11_X11_INCLUDE_PATH} ${PHONON_INCLUDE_DIR}
          /usr/include )


/usr/bin/moc -I/home/buscher/QT/phonon-gstreamer/build/gstreamer -
I/home/buscher/QT/phonon-gstreamer/gstreamer -I/usr/include/KDE -
I/usr/include/qt4/QtXmlPatterns -I/usr/include/qt4/QtXml -
I/usr/include/qt4/QtWebKit -I/usr/include/qt4/QtUiTools -
I/usr/include/qt4/QtTest -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtSql -
I/usr/include/qt4/QtScriptTools -I/usr/include/qt4/QtScript -
I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtNetwork -
I/usr/include/qt4/QtMultimedia -I/usr/include/qt4/QtHelp -
I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtDeclarative -
I/usr/include/qt4/QtDBus -I/usr/include/qt4/Qt3Support -
I/usr/include/qt4/QtGui -I/usr/include/qt4/QtCore -I/usr/include/qt4/Qt -
I/usr/share/qt4/mkspecs/default -I/usr/include/qt4 -
I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -
I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -D_BSD_SOURCE -
DPHONON_GST_VERSION="4.6.50" -DPHONON_BACKEND_VERSION_4_4 -
DPHONON_EXPERIMENTAL -o /home/buscher/QT/phonon-
gstreamer/build/gstreamer/moc_videographicsobject.cpp /home/buscher/QT/phonon-
gstreamer/gstreamer/videographicsobject.h
/home/buscher/QT/phonon-gstreamer/gstreamer/videographicsobject.h:42: Error:
Undefined interface
AUTOMOC: error: process for /home/buscher/QT/phonon-
gstreamer/build/gstreamer/moc_videographicsobject.cpp failed:
/home/buscher/QT/phonon-gstreamer/gstreamer/videographicsobject.h:42: Error:
Undefined interface
(0031820)
Alex Neundorf   
2012-12-03 12:59   
Ok, so here we have the case that another library installs header, which are accessed via the system include search path, which is then stripped from the include dirs for a target. This one here is even independent from messing with CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES as in the phonon case, since /usr/include is part of the default CMAKE_CXX_IMPLICIT_INCLUDE_DIRS as set in Modules/Platforms/UnixPaths.cmake.

So I guess instead of simply querying the target for its include directories, automoc needs to query the target for its include dirs without having the system include dirs stripped away.
(0031853)
Alex Neundorf   
2012-12-07 15:27   
This should now really be fixed in the TheRealAutomocIncludeDirFix branch on cmake stage.
Can you give this a try ?
(0031856)
Michael Palimaka   
2012-12-08 09:22   
Thanks, both phonon and phonon-vlc build correctly with the patch from that branch.
(0031857)
Alex Neundorf   
2012-12-08 11:59   
Merged into next, this will be in the next release.