You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 1, 2021. It is now read-only.
Tested on Arch Linux with with cmake 3.14.6, 3.15.5 & 3.16.4 (and on Alpine Linux with cmake 3.16.4). Compilation works fine with cmake 3.14.6 and 3.15.5 but breaks with cmake 3.16.4 with the error:
[ 51%] Building CXX object plugins/system-update/CMakeFiles/UbuntuUpdatePanel.dir/UbuntuUpdatePanel_autogen/mocs_compilation.cpp.o
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:59:6: error: ‘BackendPlugin’ has not been declared
59 | void BackendPlugin::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
| ^~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:67:38: error: ‘BackendPlugin’ has not been declared
67 | QT_INIT_METAOBJECT const QMetaObject BackendPlugin::staticMetaObject = { {
| ^~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:68:34: error: ‘QQmlExtensionPlugin’ was not declared in this scope
68 | QMetaObject::SuperData::link<QQmlExtensionPlugin::staticMetaObject>(),
| ^~~~~~~~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:68:29: error: parse error in template argument list
68 | QMetaObject::SuperData::link<QQmlExtensionPlugin::staticMetaObject>(),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:68:73: error: no matching function for call to ‘QMetaObject::SuperData::link<<expression error> >()’
68 | QMetaObject::SuperData::link<QQmlExtensionPlugin::staticMetaObject>(),
| ^
In file included from /usr/include/qt/QtCore/qobject.h:46,
from /usr/include/qt/QtCore/QObject:1,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/src/plugin.h:24,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:10,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/usr/include/qt/QtCore/qobjectdefs.h:599:69: note: candidate: ‘template<const QMetaObject& MO> static constexpr QMetaObject::SuperData QMetaObject::SuperData::link()’
599 | template <const QMetaObject &MO> static constexpr SuperData link()
| ^~~~
/usr/include/qt/QtCore/qobjectdefs.h:599:69: note: template argument deduction/substitution failed:
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:68:73: error: template argument 1 is invalid
68 | QMetaObject::SuperData::link<QQmlExtensionPlugin::staticMetaObject>(),
| ^
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:77:20: error: ‘BackendPlugin’ has not been declared
77 | const QMetaObject *BackendPlugin::metaObject() const
| ^~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:77:48: error: non-member function ‘const QMetaObject* metaObject()’ cannot have cv-qualifier
77 | const QMetaObject *BackendPlugin::metaObject() const
| ^~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: In function ‘const QMetaObject* metaObject()’:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:79:21: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected within this context
79 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
| ^~~~~
In file included from /usr/include/qt/QtCore/QObject:1,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/src/plugin.h:24,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:10,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/usr/include/qt/QtCore/qobject.h:450:33: note: declared protected here
450 | QScopedPointer<QObjectData> d_ptr;
| ^~~~~
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:79:21: error: invalid use of non-static data member ‘QObject::d_ptr’
79 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
| ^~~~~
In file included from /usr/include/qt/QtCore/QObject:1,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/src/plugin.h:24,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:10,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/usr/include/qt/QtCore/qobject.h:450:33: note: declared here
450 | QScopedPointer<QObjectData> d_ptr;
| ^~~~~
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:79:50: error: ‘QScopedPointer<QObjectData> QObject::d_ptr’ is protected within this context
79 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
| ^~~~~
In file included from /usr/include/qt/QtCore/QObject:1,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/src/plugin.h:24,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:10,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/usr/include/qt/QtCore/qobject.h:450:33: note: declared protected here
450 | QScopedPointer<QObjectData> d_ptr;
| ^~~~~
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:79:50: error: invalid use of non-static data member ‘QObject::d_ptr’
79 | return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
| ^~~~~
In file included from /usr/include/qt/QtCore/QObject:1,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/src/plugin.h:24,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:10,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/usr/include/qt/QtCore/qobject.h:450:33: note: declared here
450 | QScopedPointer<QObjectData> d_ptr;
| ^~~~~
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: At global scope:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:82:7: error: ‘BackendPlugin’ has not been declared
82 | void *BackendPlugin::qt_metacast(const char *_clname)
| ^~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: In function ‘void* qt_metacast(const char*)’:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:86:35: error: invalid use of ‘this’ in non-member function
86 | return static_cast<void*>(this);
| ^~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:87:12: error: ‘QQmlExtensionPlugin’ has not been declared
87 | return QQmlExtensionPlugin::qt_metacast(_clname);
| ^~~~~~~~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: At global scope:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:90:5: error: ‘BackendPlugin’ has not been declared
90 | int BackendPlugin::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
| ^~~~~~~~~~~~~
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: In function ‘int qt_metacall(QMetaObject::Call, int, void**)’:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:92:11: error: ‘QQmlExtensionPlugin’ has not been declared
92 | _id = QQmlExtensionPlugin::qt_metacall(_c, _id, _a);
| ^~~~~~~~~~~~~~~~~~~
In file included from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:13,
from /home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/mocs_compilation.cpp:2:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp: In function ‘QObject* qt_plugin_instance()’:
/home/luca/dev/postmarketOS/unity8-stuff/system-settings/build/plugins/system-update/UbuntuUpdatePanel_autogen/EWIEGA46WW/moc_plugin.cpp:114:22: error: ‘BackendPlugin’ does not name a type
114 | QT_MOC_EXPORT_PLUGIN(BackendPlugin, BackendPlugin)
| ^~~~~~~~~~~~~
make[2]: *** [plugins/system-update/CMakeFiles/UbuntuUpdatePanel.dir/build.make:63: plugins/system-update/CMakeFiles/UbuntuUpdatePanel.dir/UbuntuUpdatePanel_autogen/mocs_compilation.cpp.o] Error 1
From what I can tell, #include "plugin.h" in the moc file doesn't get resolved to plugins/system-update/plugin.h but to a different plugin.h somewhere in the tree (tested with #warning statements in plugins/system-update/plugin.h) which causes Backend plugin to not get defined.
I've also checked the exact build command that cmake executes by passing VERBOSE=1 to make which resulted in the following commands for the different cmake versions:
Ignoring the fact that cmake 3.14.6 puts -std=gnu++11 into the command, they're otherwise identical and both produce an error in a build tree with cmake 3.16.4; so the problem seems to happen earlier in the build process.
The text was updated successfully, but these errors were encountered:
d018d27c101869e4e2449f938df89d4f97c5b73c is the first bad commit
commit d018d27c101869e4e2449f938df89d4f97c5b73c
Author: Sebastian Holtermann <sebholt@xwmw.org>
Date: Fri Sep 13 15:17:24 2019 +0200
Autogen: Add moc path prefix generation (AUTOMOC_PATH_PREFIX)
The new `AUTOMOC_PATH_PREFIX` boolean target property enables automatic
generation of the path prefix `-p` option for `moc`.
`AUTOMOC_PATH_PREFIX` is initialized from the variable
`CMAKE_AUTOMOC_PATH_PREFIX`, which is ON by default.
When `AUTOMOC_PATH_PREFIX` is enabled, CMake tests if a `moc`ed header file is
in one of the include directories. If so, then the `-p` option, with the
relative path of the header parent directory to the respective include
directory, is added to the `moc` command. If the header file is not in an
include directory, the `-p` option is omitted.
Closes: #18815 "AUTOMOC: generated files include full relative path,
breaking certain reproducible builds"
Modules/CMakeGenericSystem.cmake | 1 +
Source/cmQtAutoGenInitializer.cxx | 2 +
Source/cmQtAutoMocUic.cxx | 110 ++++++++++++++++++++++++++------------
Source/cmQtAutoMocUic.h | 7 +--
Source/cmTarget.cxx | 1 +
5 files changed, 84 insertions(+), 37 deletions(-)
bisect run success
Tested on Arch Linux with with cmake 3.14.6, 3.15.5 & 3.16.4 (and on Alpine Linux with cmake 3.16.4). Compilation works fine with cmake 3.14.6 and 3.15.5 but breaks with cmake 3.16.4 with the error:
From what I can tell,
#include "plugin.h"
in the moc file doesn't get resolved toplugins/system-update/plugin.h
but to a differentplugin.h
somewhere in the tree (tested with#warning
statements inplugins/system-update/plugin.h
) which causesBackend
plugin to not get defined.I've also checked the exact build command that cmake executes by passing
VERBOSE=1
to make which resulted in the following commands for the different cmake versions:Ignoring the fact that cmake 3.14.6 puts
-std=gnu++11
into the command, they're otherwise identical and both produce an error in a build tree with cmake 3.16.4; so the problem seems to happen earlier in the build process.The text was updated successfully, but these errors were encountered: