Strange build error

Myriam Schweingruber myriam at kde.org
Thu Dec 4 15:13:31 UTC 2014


Hi all,

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:

[ 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

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:

[15:52] <kfunk> could be that sth in the include chain includes QIcon for
you and the CI, and thus doesn't fail.
[15:53] <kfunk> could even be automoc's fault, because of a different order
of moc call on the files
[15:53] <kfunk> => not easy to say what's causing this

Would be nice if somebody could check that. Thanks in advance!

Regards, Myriam
-- 
Proud member of the Amarok and KDE Community
Protect your freedom and join the Fellowship of FSFE:
http://www.fsfe.org
Please don't send me proprietary file formats,
use ISO standard ODF instead (ISO/IEC 26300)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/amarok-devel/attachments/20141204/df2ab2a4/attachment.html>


More information about the Amarok-devel mailing list