MantisBT - CMake
View Issue Details
0013667CMakeCMakepublic2012-11-09 06:312012-12-08 12:02
Christoph Feck 
Alex Neundorf 
normalmajoralways
closedfixed 
CMake 2.8.10 
 
0013667: Automoc fails to handle Q_INTERFACES
Since CMake 2.8.10, cmake fails to build Phonon from git master. The error given is:

AUTOMOC: error: process for /local/build/Qt/kdesupport/phonon/declarative/moc_mediaelement.cpp failed:
/local/git/Qt/kdesupport/phonon/declarative/mediaelement.h:55: Error: Undefined interface

Checking with Phonon developers, they assume it to be a cmake regression.
git clone kde:phonon
cd phonon
mkdir build
cd build
cmake ..
make
2.8.10.1 shows the same error.
2.8.9 worked fine.

For more information, read https://bugs.kde.org/show_bug.cgi?id=309718 [^]
No tags attached.
related to 0013646closed Alex Neundorf Automoc doesn't recognise "#if QT_VERSION = x" anymore 
related to 0013762closed Alex Neundorf Automoc still fails to handle Q_INTERFACES 
cxx cmQtAutomoc.cxx (39,159) 2012-11-17 13:01
https://public.kitware.com/Bug/file/4570/cmQtAutomoc.cxx
Issue History
2012-11-09 06:31Christoph FeckNew Issue
2012-11-09 12:32Alex NeundorfAssigned To => Alex Neundorf
2012-11-09 12:32Alex NeundorfStatusnew => assigned
2012-11-09 12:51Alex NeundorfNote Added: 0031513
2012-11-09 18:16Alex NeundorfNote Added: 0031516
2012-11-09 18:16Alex NeundorfSeverityminor => major
2012-11-09 18:16Alex NeundorfStatusassigned => closed
2012-11-09 18:16Alex NeundorfResolutionopen => fixed
2012-11-09 18:16Alex NeundorfRelationship addedrelated to 0013646
2012-11-14 07:52Christoph FeckNote Added: 0031552
2012-11-14 07:52Christoph FeckStatusclosed => feedback
2012-11-14 07:52Christoph FeckResolutionfixed => reopened
2012-11-14 07:55Raphael Kubo da CostaNote Added: 0031553
2012-11-15 15:16Alex NeundorfNote Added: 0031564
2012-11-15 16:53Alex NeundorfNote Added: 0031565
2012-11-15 16:53Alex NeundorfFile Added: cmQtAutomoc.cxx
2012-11-15 17:07Raphael Kubo da CostaNote Added: 0031566
2012-11-17 13:01Alex NeundorfFile Deleted: cmQtAutomoc.cxx
2012-11-17 13:01Alex NeundorfFile Added: cmQtAutomoc.cxx
2012-11-17 13:02Alex NeundorfNote Added: 0031596
2012-11-19 14:32Raphael Kubo da CostaNote Added: 0031614
2012-11-27 15:21David ColeFixed in Version => CMake 2.8.10.2
2012-11-27 15:21David ColeTarget Version => CMake 2.8.10.2
2012-11-27 15:21David ColeStatusfeedback => resolved
2012-11-27 15:21David ColeResolutionreopened => fixed
2012-12-07 15:25Alex NeundorfRelationship addedrelated to 0013762
2012-12-07 15:29Alex NeundorfNote Added: 0031854
2012-12-07 15:29Alex NeundorfStatusresolved => feedback
2012-12-07 15:29Alex NeundorfResolutionfixed => reopened
2012-12-08 12:02Alex NeundorfNote Added: 0031858
2012-12-08 12:02Alex NeundorfStatusfeedback => closed
2012-12-08 12:02Alex NeundorfResolutionreopened => fixed
2012-12-08 12:02Alex NeundorfFixed in VersionCMake 2.8.10.2 =>
2012-12-08 12:02Alex NeundorfTarget VersionCMake 2.8.10.2 =>

Notes
(0031513)
Alex Neundorf   
2012-11-09 12:51   
-I/usr/lib/qt/include is missing in the moc call with 2.8.10 compared to 2.8.9.
Checking where this gets lost...
(0031516)
Alex Neundorf   
2012-11-09 18:16   
Fixed.
This is in the FixAutomocRegression branch on cmake stage:
http://cmake.org/gitweb?p=stage/cmake.git [^]

http://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=a9465098c01ace9ead62c04674dc2f4a529962f5 [^]

Please give it a try and reopen the bug report if it still doesn't work for you.
(0031552)
Christoph Feck   
2012-11-14 07:52   
I did not yet have a chance to test the commit, but according to Raphael, there are still issues with compiling Phonon. Reopening to let him add the error logs.
(0031553)
Raphael Kubo da Costa   
2012-11-14 07:55   
This Mantis interface is... weird :-)

I'm on branch `next' here.

% git describe
v2.8.10.1-890-ge39a1bd

This is what I get now:

Generating moc_mediaelement.cpp
/usr/bin/moc -I/b/kde/kdesupport/phonon/phonon/declarative -I/b/kde/kdesupport/phonon/phonon/phonon -I/b
/kde/kdesupport/phonon/phonon/declarative/.. -I/home/rakuco/dev/kde/src/kdesupport/phonon/phonon/declara
tive -I/home/rakuco/dev/kde/src/kdesupport/phonon/phonon/includes -I/home/rakuco/dev/kde/src/kdesupport/
phonon/phonon/phonon -I/home/rakuco/dev/kde/src/kdesupport/phonon/phonon -I/usr/include/QtXmlPatterns -I
/usr/include/QtXml -I/usr/include/QtWebKit -I/usr/include/QtUiTools -I/usr/include/QtTest -I/usr/include
/QtSvg -I/usr/include/QtSql -I/usr/include/QtScriptTools -I/usr/include/QtScript -I/usr/include/QtOpenGL
 -I/usr/include/QtNetwork -I/usr/include/QtMultimedia -I/usr/include/QtHelp -I/usr/include/QtDesigner -I
/usr/include/QtDeclarative -I/usr/include/QtDBus -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/i
nclude/QtCore -I/usr/include/Qt -I/usr/share/qt/mkspecs/default -I/usr/include -I/usr/lib/gcc/x86_64-unk
nown-linux-gnu/4.7.2/../../../../include/c++/4.7.2 -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../.
./../include/c++/4.7.2/x86_64-unknown-linux-gnu -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/../../../.
./include/c++/4.7.2/backward -I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/include -I/usr/local/include
-I/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/include-fixed -I/usr/include -DPHONON_ASSERT_STATES -D_BSD
_SOURCE -o /b/kde/kdesupport/phonon/phonon/declarative/moc_mediaelement.cpp /home/rakuco/dev/kde/src/kde
support/phonon/phonon/declarative/mediaelement.h
usr/include/c++/4.7.2/bits/stl_relops.:68: Parse error at "std"
AUTOMOC: error: process for /b/kde/kdesupport/phonon/phonon/declarative/moc_mediaelement.cpp failed:
usr/include/c++/4.7.2/bits/stl_relops.:68: Parse error at "std"
(0031564)
Alex Neundorf   
2012-11-15 15:16   
Does that mean moc relies on not finding all headers, because it can't parse them all ?
(0031565)
Alex Neundorf   
2012-11-15 16:53   
Please try the FixAutomocRegression2 branch from cmake stage (http://www.cmake.org/Wiki/CMake/Git [^]) or replace Source/cmQtAutomoc.cxx in your checkout with the one attached here.
(0031566)
Raphael Kubo da Costa   
2012-11-15 17:07   
Worked fine now, thanks!
(0031596)
Alex Neundorf   
2012-11-17 13:02   
I updated the FixAutomocRegression2 branch and also the cmQtAutomoc.cxx attached here, please test it again.
It is less intrusive now, it only adds QT_INCLUDE_DIR now if QT_QTCORE_INCLUDE_DIR has been detected but QT_INCLUDE_DIR is missing.
(0031614)
Raphael Kubo da Costa   
2012-11-19 14:32   
I can confirm it still works fine.
(0031854)
Alex Neundorf   
2012-12-07 15:29   
It can still fail, if other include dirs needed for moc are part of the implicit include dirs, see 0013762.
The TheRealAutomocIncludeDirFix on cmake stage should now really fix it.
Now moc gets the include dirs without the implicit include dirs stripped off.

Can you please give it a try and let me know whether it works for you ?
(0031858)
Alex Neundorf   
2012-12-08 12:02   
In 0013762 the reporter confirms that this works now.
Merged into next.