<div dir="ltr">Hi all,<div><br></div><div>as a Google Code-In Beginner task students are asked to build Amarok from source. Today we ran into a very strange error a student experienced, which I can't reproduce here, despite using the same distribution (Kubuntu 14.10) and Qt version:</div><div><br></div><div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap">[ 10%] Built target amarokshared_automoc
[ 10%] Built target amarokshared
[ 10%] Built target amaroklib_automoc
[ 10%] Built target amarokcore_automoc
Linking CXX shared library ../../lib/libamarokcore.so
[ 10%] Built target amarokcore
[ 10%] Built target amarokpud
[ 10%] Built target amarokocsclient_automoc
[ 10%] Built target amarokocsclient
[ 10%] Built target amarok-transcoding_automoc
Linking CXX shared library ../../lib/libamarok-transcoding.so
[ 10%] Built target amarok-transcoding
[ 10%] Building CXX object src/CMakeFiles/amaroklib.dir/amaroklib_automoc.o
In file included from /home/pcchou/project/gci/amarok/src/amaroklib_automoc.cpp:4:0:
/home/pcchou/project/gci/amarok/src/moc_PlaylistProviderExporter.cpp: In member function ‘virtual int AmarokScript::PlaylistProviderPrototype::qt_metacall(QMetaObject::Call, int, void**)’:
/home/pcchou/project/gci/amarok/src/moc_PlaylistProviderExporter.cpp:145:55: error: invalid use of incomplete type ‘class QIcon’
         case 3: *reinterpret_cast< QIcon*>(_v) = icon(); break;
                                                       ^
In file included from /usr/include/qt4/QtCore/QMetaType:1:0,
                 from /home/pcchou/project/gci/amarok/src/core/playlists/Playlist.h:24,
                 from /home/pcchou/project/gci/amarok/src/core/playlists/PlaylistProvider.h:21,
                 from /home/pcchou/project/gci/amarok/src/scripting/scriptengine/exporters/PlaylistProviderExporter.h:21,
                 from /home/pcchou/project/gci/amarok/src/moc_PlaylistProviderExporter.cpp:9,
                 from /home/pcchou/project/gci/amarok/src/amaroklib_automoc.cpp:4:
/usr/include/qt4/QtCore/qmetatype.h:324:7: error: forward declaration of ‘class QIcon’
 class QIcon;
       ^
src/CMakeFiles/amaroklib.dir/build.make:294: recipe for target 'src/CMakeFiles/amaroklib.dir/amaroklib_automoc.o' failed
make[2]: *** [src/CMakeFiles/amaroklib.dir/amaroklib_automoc.o] Error 1
CMakeFiles/Makefile2:1256: recipe for target 'src/CMakeFiles/amaroklib.dir/all' failed
make[1]: *** [src/CMakeFiles/amaroklib.dir/all] Error 2
Makefile:113: recipe for target 'all' failed
make: *** [all] Error 2</pre><div>The only differences I can note is that the student uses Kubuntu in a VM, mine is a direct installation, and I use clang. Kevin gave some possible errors on IRC:</div><div><br></div><div><div>[15:52] <kfunk> could be that sth in the include chain includes QIcon for you and the CI, and thus doesn't fail.</div><div>[15:53] <kfunk> could even be automoc's fault, because of a different order of moc call on the files</div><div>[15:53] <kfunk> => not easy to say what's causing this</div></div><div><br></div><div>Would be nice if somebody could check that. Thanks in advance!</div><div><br></div><div>Regards, Myriam</div>-- <br><div class="gmail_signature">Proud member of the Amarok and KDE Community<br>Protect your freedom and join the Fellowship of FSFE:<br><a href="http://www.fsfe.org" target="_blank">http://www.fsfe.org</a><br>Please don't send me proprietary file formats,<br>use ISO standard ODF instead (ISO/IEC 26300)</div>
</div></div>