Martchus / syncthingtray

Tray application and Dolphin/Plasma integration for Syncthing
https://martchus.github.io/syncthingtray/
Other
1.66k stars 44 forks source link

error: static assertion failed due to requirement 'is_complete<Data::SyncthingService, void>::value' #244

Closed dsh2dsh closed 6 months ago

dsh2dsh commented 6 months ago

Hi,

I'm trying to build syncthingtray with QT6 under FreeBSD 14 and I'm getting error building the plasmoid. It builds fine with QT5 or with QT6, but with disabled plasmoid -DNO_PLASMOID:BOOL=ON.

Relevant components

Environment and versions

Bug description I'm trying to build syncthingtray with QT6 under FreeBSD 14 and I'm getting error building the plasmoid. It builds fine with QT5 or with QT6, but with disabled plasmoid -DNO_PLASMOID:BOOL=ON.

Additional context I'm getting next error. Is it something known and may be I'm doing something wrong?

[ 96% 202/208] /usr/local/libexec/ccache/c++ -DCPP_UTILITIES_STATIC -DCPP_UTILITIES_USE_NATIVE_FILE_BUFFER -DGUI_QTQUICK -DGUI_QTWIDGETS -DKCOREADDONS_LIB -DLIB_SYNCTHING_CONNECTOR_BOOST_PROCESS -DLIB_SYNCTHING_CONNECTOR_STATIC -DLIB_SYNCTHING_MODEL_STATIC -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_FORK_AWESOME_STATIC -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_FORK_AWESOME_STATIC -DQT_QUICK_LIB -DQT_STATICPLUGIN -DQT_SVG_LIB -DQT_UTILITIES_GUI_QTWIDGETS -DQT_UTILITIES_STATIC -DQT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS -DQT_WIDGETS_LIB -DSYNCTHINGPLASMOID_GUI_QTQUICK -DSYNCTHINGPLASMOID_GUI_QTWIDGETS -DSYNCTHINGPLASMOID_STATIC -DSYNCTHINGWIDGETS_GUI_QTWIDGETS -DSYNCTHINGWIDGETS_NO_WEBVIEW -DSYNCTHINGWIDGETS_STATIC -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtutilities/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtutilities/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/c++utilities/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/c++utilities/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtforkawesome/qtquickforkawesome/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtquickforkawesome/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtforkawesome/qtforkawesome/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtforkawesome/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtforkawesome/headers -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingmodel/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingmodel/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingwidgets/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingwidgets/include -isystem /usr/local/include/qt6/QtGui -isystem /usr/local/include/qt6 -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -isystem /usr/local/include -isystem /usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtDBus -isystem /usr/local/include/qt6/QtQuick -isystem /usr/local/include/qt6/QtQml -isystem /usr/local/include/qt6/QtQmlIntegration -isystem /usr/local/include/qt6/QtNetwork -isystem /usr/local/include/qt6/QtQmlModels -isystem /usr/local/include/qt6/QtOpenGL -isystem /usr/local/include/qt6/QtSvg -isystem /usr/local/include/qt6/QtConcurrent -isystem /usr/local/include/Plasma -isystem /usr/local/include/KF6/KConfig -isystem /usr/local/include/KF6/KConfigCore -isystem /usr/local/include/KF6/KCoreAddons -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG  -DNDEBUG -std=gnu++17 -fvisibility=hidden -fPIC -pthread -MD -MT syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o -MF syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o.d -o syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o -c /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/mocs_compilation.cpp
FAILED: syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o 
/usr/local/libexec/ccache/c++ -DCPP_UTILITIES_STATIC -DCPP_UTILITIES_USE_NATIVE_FILE_BUFFER -DGUI_QTQUICK -DGUI_QTWIDGETS -DKCOREADDONS_LIB -DLIB_SYNCTHING_CONNECTOR_BOOST_PROCESS -DLIB_SYNCTHING_CONNECTOR_STATIC -DLIB_SYNCTHING_MODEL_STATIC -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_FORK_AWESOME_STATIC -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_FORK_AWESOME_STATIC -DQT_QUICK_LIB -DQT_STATICPLUGIN -DQT_SVG_LIB -DQT_UTILITIES_GUI_QTWIDGETS -DQT_UTILITIES_STATIC -DQT_UTILITIES_SUPPORT_DBUS_NOTIFICATIONS -DQT_WIDGETS_LIB -DSYNCTHINGPLASMOID_GUI_QTQUICK -DSYNCTHINGPLASMOID_GUI_QTWIDGETS -DSYNCTHINGPLASMOID_STATIC -DSYNCTHINGWIDGETS_GUI_QTWIDGETS -DSYNCTHINGWIDGETS_NO_WEBVIEW -DSYNCTHINGWIDGETS_STATIC -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtutilities/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtutilities/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/c++utilities/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/c++utilities/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtforkawesome/qtquickforkawesome/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtquickforkawesome/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtforkawesome/qtforkawesome/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtforkawesome/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/qtforkawesome/qtforkawesome/headers -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingmodel/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingmodel/include -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingwidgets/.. -I/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingwidgets/include -isystem /usr/local/include/qt6/QtGui -isystem /usr/local/include/qt6 -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -isystem /usr/local/include -isystem /usr/local/include/qt6/QtWidgets -isystem /usr/local/include/qt6/QtDBus -isystem /usr/local/include/qt6/QtQuick -isystem /usr/local/include/qt6/QtQml -isystem /usr/local/include/qt6/QtQmlIntegration -isystem /usr/local/include/qt6/QtNetwork -isystem /usr/local/include/qt6/QtQmlModels -isystem /usr/local/include/qt6/QtOpenGL -isystem /usr/local/include/qt6/QtSvg -isystem /usr/local/include/qt6/QtConcurrent -isystem /usr/local/include/Plasma -isystem /usr/local/include/KF6/KConfig -isystem /usr/local/include/KF6/KConfigCore -isystem /usr/local/include/KF6/KCoreAddons -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DLIBICONV_PLUG  -DNDEBUG -std=gnu++17 -fvisibility=hidden -fPIC -pthread -MD -MT syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o -MF syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o.d -o syncthingtray/plasmoid/lib/CMakeFiles/syncthingplasmoid.dir/syncthingplasmoid_autogen/mocs_compilation.cpp.o -c /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/mocs_compilation.cpp
In file included from /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/mocs_compilation.cpp:2:
In file included from /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/EWIEGA46WW/moc_syncthingapplet.cpp:9:
In file included from /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/EWIEGA46WW/../../syncthingapplet.h:4:
In file included from /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/../syncthingwidgets/misc/dbusstatusnotifier.h:6:
In file included from /wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/qtutilities/../qtutilities/misc/dbusnotification.h:6:
In file included from /usr/local/include/qt6/QtCore/QObject:1:
In file included from /usr/local/include/qt6/QtCore/qobject.h:18:
/usr/local/include/qt6/QtCore/qmetatype.h:1189:13: error: static assertion failed due to requirement 'is_complete<Data::SyncthingService, void>::value': Pointer Meta Types must either point to fully-defined types or be declared with Q_DECLARE_OPAQUE_POINTER(T *)
            static_assert(is_complete<Pointed, void>::value,
            ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/qt6/QtCore/qmetatype.h:2600:9: note: in instantiation of function template specialization 'QtPrivate::checkTypeIsSuitableForMetaType<Data::SyncthingService *>' requested here
        checkTypeIsSuitableForMetaType<Ty>();
        ^
/usr/local/include/qt6/QtCore/qmetatype.h:2660:16: note: in instantiation of function template specialization 'QtPrivate::qTryMetaTypeInterfaceForType<(anonymous namespace)::qt_meta_stringdata_CLASSPlasmoidSCOPESyncthingAppletENDCLASS_t, QtPrivate::TypeAndForceComplete<Data::SyncthingService *, std::integral_constant<bool, true>>>' requested here
    QtPrivate::qTryMetaTypeInterfaceForType<Unique, T>()...
               ^
/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/plasmoid/lib/syncthingplasmoid_autogen/EWIEGA46WW/moc_syncthingapplet.cpp:731:5: note: in instantiation of variable template specialization 'qt_incomplete_metaTypeArray<(anonymous namespace)::qt_meta_stringdata_CLASSPlasmoidSCOPESyncthingAppletENDCLASS_t, QtPrivate::TypeAndForceComplete<Data::SyncthingConnection *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingDirectoryModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingSortFilterModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingDeviceModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingSortFilterModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingDownloadModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingRecentChangesModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingStatusSelectionModel *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingService *, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QIcon, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingStatistics, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Data::SyncthingStatistics, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QList<QString>, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<int, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QSize, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QList<QtUtilities::ChecklistItem>, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<Plasmoid::SyncthingApplet, std::integral_constant<bool, true>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<int, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QSize &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QObject *, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<Data::SyncthingStatus, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<Data::SyncthingStatus, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<Data::SyncthingErrorCategory, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<int, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QNetworkRequest &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QByteArray &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<CppUtilities::DateTime, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<bool, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<int, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<void, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QIcon, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<int, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QIcon, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<unsigned long long, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<QString, std::integral_constant<bool, false>>, QtPrivate::TypeAndForceComplete<const QString &, std::integral_constant<bool, false>>>' requested here
    qt_incomplete_metaTypeArray<qt_meta_stringdata_CLASSPlasmoidSCOPESyncthingAppletENDCLASS_t,
    ^
1 error generated.
Martchus commented 6 months ago

It is weird that you're building static libs but also want to build the plasmoid. How do you plan to use the plasmoid after building it as static lib?

I have never built this part of the code with clang which apparently behaves differently than GCC. I highly recommend switching to GCC. If you're using libc++ I also suggest to switch to libstdc++. Of course I'll accept PRs improving compatibility with other vendors but especially for this part of the code you're on your own. One thing you could try is adding the header file this is defined in to syncthingapplet.cpp (if it is not already there).

dsh2dsh commented 6 months ago

It is weird that you're building static libs but also want to build the plasmoid. How do you plan to use the plasmoid after building it as static lib?

I'm not sure I understand? What do you mean I'm building static libs?

The plasmoid builds fine with QT5 and doesn't build with QT6. I didn't change anything, except QT version. Here is a full build log.

I have never built this part of the code with clang which apparently behaves differently than GCC.

Cool, it's a good info. Tomorrow I'll try to build it with QT6 and GCC. Thank you.

Martchus commented 6 months ago

You haven't shown how you invoked the build but compiler invocations have flags like -DLIB_SYNCTHING_CONNECTOR_STATIC suggesting you build static libs. Note that building static libs is CMake's default which my projects also don't change and do support - just for the plasmoid it probably doesn't make much sense.

dsh2dsh commented 6 months ago

Hi,

I highly recommend switching to GCC.

I just tried to build it with GCC 13 and got an error:

/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/syncthingprocess.cpp: In lambda function:
/wrkdirs/overlays/dshports/deskutils/syncthingtray/work-qt6/syncthingtray/syncthingconnector/syncthingprocess.cpp:484:75: error: 'stream_timeout' is not a member of 'std::errc'
  484 |         const auto error = ec == std::errc::timed_out || ec == std::errc::stream_timeout ? QProcess::Timedout : QProcess::Crashed;
      |                                                                           ^~~~~~~~~~~~~~

Here is full build log. Am I doing something wrong?

If you're using libc++ I also suggest to switch to libstdc++.

Am I using libc++? I'm asking because I didn't select what to use, libc++ or libstdc++. Could you explain me, how to switch the build to use libstdc++ instead of libc++?

One thing you could try is adding the header file this is defined in to syncthingapplet.cpp (if it is not already there).

May I ask, what header file do you mean? And I can't understand what do you mean by if it is not already there. I didn't modify syncthingapplet.cpp, so if you added a header file into it it's there.

have flags like -DLIB_SYNCTHING_CONNECTOR_STATIC

I'm sure I didn't add this flag. Something else adds it and I can't find what is it. Could you suggest, how to get rid of it. What -D flag should I add?

Thanks for your help.

Martchus commented 6 months ago

I'm asking because I didn't select what to use …

Then it depends on how you configured your compiler. Clang is normally defaulting to libstdc++ under GNU/Linux but on other platforms it might use another standard library.

Could you explain me, how to switch the build to use libstdc++ instead of libc++?

You can just add -stdlib=libstdc++ to CXX_FLAGS. You must use this when building all of your dependencies that provide C++ interfaces because you cannot mix standard libraries. (Probably you don't want to go down that road.)

May I ask, what header file do you mean?

Data::SyncthingService is defined in syncthingservice.h so adding an include for that header in syncthingapplet.cpp would make sense. However, it looks like this include is already there so this cannot be the culprit. I would have to dig deeper but for that I needed a way to reproduce the build error first (and creating a FreeBSD VM is probably too much effort for me).


I'm sure I didn't add this flag.

This flag is added when building static libraries and that is the default for CMake-based projects. I also haven't diverted from this default so you need to specify -DBUILD_SHARED_LIBS:BOOL=ON explicitly when invoking CMake (see the official CMake documentation). (At least if you'd like to use the Plasmoid which simply needs to be a dynamically loaded plugin; otherwise using static libraries is fine.)


In your GCC build std::errc::stream_timeout cannot be found. It is a normally guaranteed to be defined by the C++ standard (https://en.cppreference.com/w/cpp/error/errc) but apparently at least libstdc++ only defines it conditionally. I've just pushed a change that may help with that: https://github.com/Martchus/syncthingtray/commit/fe3d7891e92444c38150d3321d6c7c2bac170a82

dsh2dsh commented 6 months ago

It is a normally guaranteed to be defined by the C++ standard (https://en.cppreference.com/w/cpp/error/errc)

But according to this page std::errc::stream_timeout is deprecated.

I've just pushed a change that may help with that: https://github.com/Martchus/syncthingtray/commit/fe3d7891e92444c38150d3321d6c7c2bac170a82

It didn't help. The error is the same 'stream_timeout' is not a member of 'std::errc'. But even if I remove this check just for test build, I can't build it using gcc, because more errors, something about QByteArray::toStdString not found. Anyway it doesn't matter. I found a way how to build it with clang and Qt6. After applying this patch

+#ifdef LIB_SYNCTHING_CONNECTOR_SUPPORT_SYSTEMD
     Q_PROPERTY(Data::SyncthingService *service READ service NOTIFY serviceChanged)
+#endif

to plasmoid/lib/syncthingapplet.h I builded it without errors. Actually I'm not sure what I did and may be I did something wrong. I just found that every occurrence of Data::SyncthingService in your code is wrapped into this ifdef. So I did the same for this Q_PROPERTY.

Thank you for help. I'm closing this issue, because it's resolved for me.

Martchus commented 6 months ago

Looks like you found a bug and the correct solution. You can create a PR with that change.

dsh2dsh commented 6 months ago

Great, thanks. I created PR #245