Build (without SCRIPT_INTERFACE) on Qt 5.7 broken again

• Feb 6, 2019 - 19:21
Reported version
3.0
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
active
Regression
Yes
Workaround
No
Project

This is a follow-up to my PR that was forcibly superceded by this PR.

Unfortunately, things are broken again:

[  3%] Building CXX object libmscore/CMakeFiles/libmscore.dir/segmentlist.cpp.o
cd /tmp/buildd/musescore-snapshot-3.0.2+dfsg1/obj-i686-linux-gnu/libmscore && /usr/bin/c++   -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_HELP_LIB -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -I/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/obj-i686-linux-gnu/libmscore -I/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/libmscore -I/usr/include/i386-linux-gnu/qt5 -I/usr/include/i386-linux-gnu/qt5/QtCore -I/usr/lib/i386-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/i386-linux-gnu/qt5/QtGui -I/usr/include/i386-linux-gnu/qt5/QtNetwork -I/usr/include/i386-linux-gnu/qt5/QtTest -I/usr/include/i386-linux-gnu/qt5/QtQml -I/usr/include/i386-linux-gnu/qt5/QtQuick -I/usr/include/i386-linux-gnu/qt5/QtQuickWidgets -I/usr/include/i386-linux-gnu/qt5/QtWidgets -I/usr/include/i386-linux-gnu/qt5/QtXml -I/usr/include/i386-linux-gnu/qt5/QtXmlPatterns -I/usr/include/i386-linux-gnu/qt5/QtSvg -I/usr/include/i386-linux-gnu/qt5/QtSql -I/usr/include/i386-linux-gnu/qt5/QtPrintSupport -I/usr/include/i386-linux-gnu/qt5/QtConcurrent -I/usr/include/i386-linux-gnu/qt5/QtOpenGL -I/usr/include/i386-linux-gnu/qt5/QtHelp -I/tmp/buildd/musescore-snapshot-3.0.2+dfsg1 -I/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/obj-i686-linux-gnu -I/usr/include/freetype2 -I/usr/include/poppler -I/usr/include/poppler/qt5 -I/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/thirdparty/dtl  -g -O2 -fdebug-prefix-map=/tmp/buildd/musescore-snapshot-3.0.2+dfsg1=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DQT_NO_DEBUG -DNDEBUG -DMSCORE_NO_UPDATE_CHECKER -std=gnu++11 -fPIC   -g -include /tmp/buildd/musescore-snapshot-3.0.2+dfsg1/obj-i686-linux-gnu/all.h -Wall -Wextra -Winvalid-pch -Woverloaded-virtual  -o CMakeFiles/libmscore.dir/segmentlist.cpp.o -c /tmp/buildd/musescore-snapshot-3.0.2+dfsg1/libmscore/segmentlist.cpp
In file included from /usr/include/i386-linux-gnu/qt5/QtCore/qobject.h:46:0,
                 from /usr/include/i386-linux-gnu/qt5/QtCore/qabstractanimation.h:43,
                 from /usr/include/i386-linux-gnu/qt5/QtCore/QtCore:4,
                 from /usr/include/i386-linux-gnu/qt5/QtGui/QtGuiDepends:3,
                 from /usr/include/i386-linux-gnu/qt5/QtGui/QtGui:3,
                 from all.h:62:
/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/libmscore/layoutbreak.h: In function 'constexpr const QMetaObject* Ms::qt_getEnumMetaObject(Ms::LayoutBreak::Type)':
/usr/include/i386-linux-gnu/qt5/QtCore/qobjectdefs.h:123:101: error: 'staticMetaObject' was not declared in this scope
     friend Q_DECL_CONSTEXPR const QMetaObject *qt_getEnumMetaObject(ENUM) Q_DECL_NOEXCEPT { return &staticMetaObject; } \
                                                                                                     ^
/usr/include/i386-linux-gnu/qt5/QtCore/qobjectdefs.h:125:30: note: in expansion of macro 'Q_ENUM_IMPL'
 #define Q_ENUM(x) Q_ENUMS(x) Q_ENUM_IMPL(x)
                              ^~~~~~~~~~~
/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/libmscore/layoutbreak.h:35:7: note: in expansion of macro 'Q_ENUM'
       Q_ENUM(Type)
       ^
/usr/include/i386-linux-gnu/qt5/QtCore/qobjectdefs.h:123:119: error: body of constexpr function 'constexpr const QMetaObject* Ms::qt_getEnumMetaObject(Ms::LayoutBreak::Type)' not a return-statement
     friend Q_DECL_CONSTEXPR const QMetaObject *qt_getEnumMetaObject(ENUM) Q_DECL_NOEXCEPT { return &staticMetaObject; } \
                                                                                                                       ^
/usr/include/i386-linux-gnu/qt5/QtCore/qobjectdefs.h:125:30: note: in expansion of macro 'Q_ENUM_IMPL'
 #define Q_ENUM(x) Q_ENUMS(x) Q_ENUM_IMPL(x)
                              ^~~~~~~~~~~
/tmp/buildd/musescore-snapshot-3.0.2+dfsg1/libmscore/layoutbreak.h:35:7: note: in expansion of macro 'Q_ENUM'
       Q_ENUM(Type)
       ^
libmscore/CMakeFiles/libmscore.dir/build.make:91: recipe for target 'libmscore/CMakeFiles/libmscore.dir/segmentlist.cpp.o' failed
make[4]: *** [libmscore/CMakeFiles/libmscore.dir/segmentlist.cpp.o] Error 1

The fix is likely easy enough: the original patch from ABL added some explicit Q_DECLARE_METATYPE invocations (which apparently are not needed with the Q_ENUM_NS but don’t harm there), see here for example.

I’ve only tested this on 3.0.2… master is likely to require a bit more intervention, I don’t have the time for this right now but will get back to this unless someone else beats me to it ☺


Comments