A problem similar to QTBUG-90353, but this time it occurred on GCC 11.0.1.
I just did as https://wiki.qt.io/Building_Qt_6_from_Git told.
- git clone
- git checkout 6.1
- init-repository
- make and enter the build dir
- ../qt5/configure -developer-build – -D QT_BUILD_TESTS_BY_DEFAULT=OFF
- cmake --build . --parallel
But those macros did not work. I still got "all warnings being treated as errors":
In file included from /home/gbcat/cpp/qt6-build/qtbase/include/QtCore/qglobal.h:1,
from /home/gbcat/cpp/qt5/qtbase/src/corelib/global/qt_pch.h:56,
from /home/gbcat/cpp/qt6-build/qtbase/src/corelib/CMakeFiles/Core.dir/cmake_pch.hxx:5,
from <command-line>:
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp: In static member function ‘static constexpr size_t QTimerPrivate::_qt_property_inter_offset()’:
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp:61:40: error: ‘offsetof’ within non-standard-layout type ‘QTimerPrivate’ is conditionally-supported [-Werror=invalid-offsetof]
61 | Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QTimerPrivate, int, inter, &QTimerPrivate::setInterval, 0)
/home/gbcat/cpp/qt5/qtbase/src/corelib/global/qglobal.h:1343:49: note: in expansion of macro ‘Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS5’
1343 | #define QT_OVERLOADED_MACRO_EXPAND(MACRO, ARGC) MACRO##ARGC
| ^~~~~
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp:61:5: note: in expansion of macro ‘Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS’
61 | Q_OBJECT_COMPAT_PROPERTY_WITH_ARGS(QTimerPrivate, int, inter, &QTimerPrivate::setInterval, 0)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp: In static member function ‘static constexpr size_t QTimerPrivate::_qt_property_single_offset()’:
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp:62:42: error: ‘offsetof’ within non-standard-layout type ‘QTimerPrivate’ is conditionally-supported [-Werror=invalid-offsetof]
62 | Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QTimerPrivate, bool, single, false)
| ^
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp: In static member function ‘static constexpr size_t QTimerPrivate::_qt_property_type_offset()’:
/home/gbcat/cpp/qt5/qtbase/src/corelib/kernel/qtimer.cpp:64:42: error: ‘offsetof’ within non-standard-layout type ‘QTimerPrivate’ is conditionally-supported [-Werror=invalid-offsetof]
64 | Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QTimerPrivate, Qt::TimerType, type, Qt::CoarseTimer)
|
BTW, the dev branch has the same problem too.
- relates to
-
QTBUG-89977
Qt build on GCC 11
-
- Closed
-