Amarok 2.4.1 build failure with KDE 4.7

Sam Lade admin at sentynel.com
Fri Jul 22 17:21:40 CEST 2011


On 22/07/11 16:11, Scott Kitterman wrote:
> I'm trying to update amarok for Kubuntu to build against the latest libmtp.  
> Since the last time we built amarok, KDE has been updated to 4.7 rc1 and now 
> amarok fails to build:
> 
> [ 73%] Building CXX object 
> src/context/scriptengine/javascript/CMakeFiles/amarok_appletscript_simple_javascript.dir/simplejavascriptapplet.o
> cd src/context/scriptengine/javascript && /usr/bin/c++   -
> DMAKE_AMAROK_APPLETSCRIPT_SIMPLE_JAVASCRIPT_LIB -D_BSD_SOURCE -
> D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -
> D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DKDE4_CMAKE_TOPLEVEL_DIR_LENGTH=11 -
> DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS -DQT_STRICT_ITERATORS -
> g -O2  -fmessage-length=0 -Wl,--as-needed -Wnon-virtual-dtor -Wno-long-long -
> ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-
> security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -
> Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -
> Werror=return-type -fvisibility-inlines-hidden -DNDEBUG -DQT_NO_DEBUG -fPIC -
> I. -I../../../../../src/context/scriptengine/javascript -
> I../../../../../shared -I../../../../.. -I../../../.. -
> I../../../../../src/context/scriptengine/javascript/../../.. -
> I/usr/include/KDE -I/usr/include/qt4/phonon -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/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/taglib    -
> D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -
> I/usr/include/taglib -I/usr/include/taglib-extras -o 
> CMakeFiles/amarok_appletscript_simple_javascript.dir/simplejavascriptapplet.o 
> -c 
> ../../../../../src/context/scriptengine/javascript/simplejavascriptapplet.cpp
> In file included from 
> ../../../../../src/context/scriptengine/javascript/simplejavascriptapplet.cpp:42:0:
> ../../../../../src/context/scriptengine/javascript/bind_dataengine.h:32:1: 
> error: redefinition of 'struct QMetaTypeId<Plasma::Service*>'
> /usr/include/plasma/service.h:321:1: error: previous definition of 'struct 
> QMetaTypeId<Plasma::Service*>'
> ../../../../../src/context/scriptengine/javascript/bind_dataengine.h:33:1: 
> error: redefinition of 'struct QMetaTypeId<Plasma::ServiceJob*>'
> /usr/include/KDE/Plasma/../../plasma/servicejob.h:136:1: error: previous 
> definition of 'struct QMetaTypeId<Plasma::ServiceJob*>'
> make[3]: *** 
> [src/context/scriptengine/javascript/CMakeFiles/amarok_appletscript_simple_javascript.dir/simplejavascriptapplet.o] 
> Error 1
> make[3]: Leaving directory `/tmp/buildd/amarok-2.4.1/obj-i686-linux-gnu'
> make[2]: *** 
> [src/context/scriptengine/javascript/CMakeFiles/amarok_appletscript_simple_javascript.dir/all] 
> Error 2
> make[2]: Leaving directory `/tmp/buildd/amarok-2.4.1/obj-i686-linux-gnu'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/tmp/buildd/amarok-2.4.1/obj-i686-linux-gnu'
> dh_auto_build: make -j1 returned exit code 2
> make: *** [build] Error 2
> 
> I'd appreciate any advice you have on the best way to fix this (I assume) 
> incompatibility with KDE 4.7.  I don't regularly work on the amarok package, 
> so apologies in advance if this is something obvious/well known.
> 
> Scott K
> 
> P. S. I'm not subscribed, so please CC me on any replies.

Hi,

There have been some issues with a source incompatible change in 4.7
git. Annoyingly, it seems to have happened within a single version,
making it hard to detect.

If you open src/context/scriptengine/javascript/bind_dataengine.h
there's a "#if !KDE_IS_VERSION(4, 6, 81)" check, which is the offending
line. Change the 81 to an 80 and you should be in business. (As I
understand it, beta 1 had the same version number and did not have the
source change...)

Sam


More information about the Amarok-devel mailing list