kirigami-5.47.0 fails to build on a rhel7.5 host using (default) gcc-4.8.5 compiler (against system Qt 5.9.2): build log appended below. I'm trying to build kde frameworks for epel7 addon repository for RHEL7. I can probably use an alternative compiler (gcc7 with devtoolset-7), but I'd rather avoid that if possible. ----------------- cd /builddir/build/BUILD/kirigami2-5.47.0/x86_64-redhat-linux-gnu/src && /usr/bin/c++ -DKIRIGAMI_ENABLE_DBUS -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_URL_CAST_FROM_STRING -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -Dkirigamiplugin_EXPORTS -I/builddir/build/BUILD/kirigami2-5.47.0/x86_64-redhat-linux-gnu/src -I/builddir/build/BUILD/kirigami2-5.47.0/src -I/builddir/build/BUILD/kirigami2-5.47.0/x86_64-redhat-linux-gnu/src/kirigamiplugin_autogen/include -I/builddir/build/BUILD/kirigami2-5.47.0/src/libkirigami -I/builddir/build/BUILD/kirigami2-5.47.0/x86_64-redhat-linux-gnu/src/libkirigami -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/./mkspecs/linux-g++ -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtQuickControls2 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=c++0x -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Wvla -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -std=gnu++11 -o CMakeFiles/kirigamiplugin.dir/mnemonicattached.cpp.o -c /builddir/build/BUILD/kirigami2-5.47.0/src/mnemonicattached.cpp /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp: In member function 'void DelegateRecycler::setSourceComponent(QQmlComponent*)': /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: error: no matching function for call to 'DelegateRecycler::connect(QPointer<QQuickItem>&, void (QObject::*)(QObject*), QQmlContext*&, void (QObject::*)())' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: candidates are: In file included from /usr/include/qt5/QtCore/qvariant.h:51:0, from /usr/include/qt5/QtQml/qqmlprivate.h:57, from /usr/include/qt5/QtQml/qqml.h:43, from /usr/include/qt5/QtQuick/qquickitem.h:44, from /usr/include/qt5/QtQuick/QQuickItem:1, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.h:23, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:21: /usr/include/qt5/QtCore/qobject.h:213:36: note: static QMetaObject::Connection QObject::connect(const QObject*, const char*, const QObject*, const char*, Qt::ConnectionType) static QMetaObject::Connection connect(const QObject *sender, const char *signal, ^ /usr/include/qt5/QtCore/qobject.h:213:36: note: no known conversion for argument 2 from 'void (QObject::*)(QObject*)' to 'const char*' /usr/include/qt5/QtCore/qobject.h:216:36: note: static QMetaObject::Connection QObject::connect(const QObject*, const QMetaMethod&, const QObject*, const QMetaMethod&, Qt::ConnectionType) static QMetaObject::Connection connect(const QObject *sender, const QMetaMethod &signal, ^ /usr/include/qt5/QtCore/qobject.h:216:36: note: no known conversion for argument 2 from 'void (QObject::*)(QObject*)' to 'const QMetaMethod&' /usr/include/qt5/QtCore/qobject.h:468:32: note: QMetaObject::Connection QObject::connect(const QObject*, const char*, const char*, Qt::ConnectionType) const inline QMetaObject::Connection QObject::connect(const QObject *asender, const char *asignal, ^ /usr/include/qt5/QtCore/qobject.h:468:32: note: no known conversion for argument 2 from 'void (QObject::*)(QObject*)' to 'const char*' /usr/include/qt5/QtCore/qobject.h:233:43: note: template<class Func1, class Func2> static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) static inline QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, ^ /usr/include/qt5/QtCore/qobject.h:233:43: note: template argument deduction/substitution failed: /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: mismatched types 'const typename QtPrivate::FunctionPointer<Func>::Object*' and 'QPointer<QQuickItem>' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ In file included from /usr/include/qt5/QtCore/qvariant.h:51:0, from /usr/include/qt5/QtQml/qqmlprivate.h:57, from /usr/include/qt5/QtQml/qqml.h:43, from /usr/include/qt5/QtQuick/qquickitem.h:44, from /usr/include/qt5/QtQuick/QQuickItem:1, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.h:23, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:21: /usr/include/qt5/QtCore/qobject.h:265:13: note: template<class Func1, class Func2> static typename std::enable_if<((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2) connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot) ^ /usr/include/qt5/QtCore/qobject.h:265:13: note: template argument deduction/substitution failed: /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: mismatched types 'const typename QtPrivate::FunctionPointer<Func>::Object*' and 'QPointer<QQuickItem>' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ In file included from /usr/include/qt5/QtCore/qvariant.h:51:0, from /usr/include/qt5/QtQml/qqmlprivate.h:57, from /usr/include/qt5/QtQml/qqml.h:43, from /usr/include/qt5/QtQuick/qquickitem.h:44, from /usr/include/qt5/QtQuick/QQuickItem:1, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.h:23, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:21: /usr/include/qt5/QtCore/qobject.h:274:13: note: template<class Func1, class Func2> static typename std::enable_if<(((int)(QtPrivate::FunctionPointer<Func2>::ArgumentCount) >= 0) && (! QtPrivate::FunctionPointer<Func2>::IsPointerToMemberFunction)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot, ^ /usr/include/qt5/QtCore/qobject.h:274:13: note: template argument deduction/substitution failed: /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: mismatched types 'const typename QtPrivate::FunctionPointer<Func>::Object*' and 'QPointer<QQuickItem>' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ In file included from /usr/include/qt5/QtCore/qvariant.h:51:0, from /usr/include/qt5/QtQml/qqmlprivate.h:57, from /usr/include/qt5/QtQml/qqml.h:43, from /usr/include/qt5/QtQuick/qquickitem.h:44, from /usr/include/qt5/QtQuick/QQuickItem:1, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.h:23, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:21: /usr/include/qt5/QtCore/qobject.h:305:13: note: template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == (-1)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, Func2) connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, Func2 slot) ^ /usr/include/qt5/QtCore/qobject.h:305:13: note: template argument deduction/substitution failed: /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: mismatched types 'const typename QtPrivate::FunctionPointer<Func>::Object*' and 'QPointer<QQuickItem>' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ In file included from /usr/include/qt5/QtCore/qvariant.h:51:0, from /usr/include/qt5/QtQml/qqmlprivate.h:57, from /usr/include/qt5/QtQml/qqml.h:43, from /usr/include/qt5/QtQuick/qquickitem.h:44, from /usr/include/qt5/QtQuick/QQuickItem:1, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.h:23, from /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:21: /usr/include/qt5/QtCore/qobject.h:313:13: note: template<class Func1, class Func2> static typename std::enable_if<(QtPrivate::FunctionPointer<Func2>::ArgumentCount == (-1)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) connect(const typename QtPrivate::FunctionPointer<Func1>::Object *sender, Func1 signal, const QObject *context, Func2 slot, ^ /usr/include/qt5/QtCore/qobject.h:313:13: note: template argument deduction/substitution failed: /builddir/build/BUILD/kirigami2-5.47.0/src/delegaterecycler.cpp:216:76: note: mismatched types 'const typename QtPrivate::FunctionPointer<Func>::Object*' and 'QPointer<QQuickItem>' connect(m_item, &QObject::destroyed, ctx, &QObject::deleteLater); ^ make[2]: *** [src/CMakeFiles/kirigamiplugin.dir/delegaterecycler.cpp.o] Error 1
probably needs some .data() to access the QPointer, at least that's what I remember from the older GCC 4.8.x on openSUSE fallouts.
Git commit fc5bb5fd892acc6938e0aef3709dbf00d0219050 by Marco Martin. Committed on 06/08/2018 at 14:02. Pushed by mart into branch 'master'. ld on old gcc M +1 -1 src/delegaterecycler.cpp https://commits.kde.org/kirigami/fc5bb5fd892acc6938e0aef3709dbf00d0219050