:type = const QList]’ is deprecated: Use std::as_const() instead. [-Werror=deprecated-declarations] 36 | for (auto paintable : qAsConst(beforeAndAfterItems)) delete paintable; | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/include/qt6/QtCore/qforeach.h:11, from /usr/include/qt6/QtCore/qglobal.h:57, from /usr/include/qt6/QtCore/qiodevice.h:7, from /usr/include/qt6/QtCore/qxmlstream.h:7, from /usr/include/qt6/QtCore/QXmlStreamReader:1, from ./xmlobjectinterface.h:22, from ./abstractxmlobject.h:26, from ./boundingboxlinker.h:22, from painting/paintable.h:23, from painting/paintableaggregate.h:23, from painting/paintableaggregate.cpp:20: /usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here 33 | constexpr typename std::add_const::type &qAsConst(T &t) noexcept { return t; } | ^~~~~~~~ painting/paintableaggregate.cpp: In member function ‘virtual void Molsketch::PaintableAggregate::paint(QPainter*) const’: painting/paintableaggregate.cpp:78:35: error: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList; typename std::add_const<_Tp>::type = const QList]’ is deprecated: Use std::as_const() instead. [-Werror=deprecated-declarations] 78 | for (auto paintable : qAsConst(d->after)) { | ~~~~~~~~^~~~~~~~~~ /usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here 33 | constexpr typename std::add_const::type &qAsConst(T &t) noexcept { return t; } | ^~~~~~~~ painting/paintableaggregate.cpp:88:35: error: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList; typename std::add_const<_Tp>::type = const QList]’ is deprecated: Use std::as_const() instead. [-Werror=deprecated-declarations] 88 | for (auto paintable : qAsConst(d->before)) { | ~~~~~~~~^~~~~~~~~~~ /usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here 33 | constexpr typename std::add_const::type &qAsConst(T &t) noexcept { return t; } | ^~~~~~~~ cc1plus: all warnings being treated as errors make[1]: *** [Makefile:2677: paintableaggregate.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Entering directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' compiling painting/stackedtextbox.cpp make[1]: Leaving directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' make[1]: Entering directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' compiling painting/textfield.cpp make[1]: Leaving directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' make[1]: Entering directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' compiling painting/textline.cpp make[1]: Leaving directory '/builddir/build/BUILD/Molsketch-0.8.0/libmolsketch' make: *** [Makefile:49: sub-libmolsketch-make_first-ordered] Error 2 RPM build errors: error: Bad exit status from /var/tmp/rpm-tmp.6chqkS (%build) Bad exit status from /var/tmp/rpm-tmp.6chqkS (%build) Child return code was: 1 EXCEPTION: [Error()] Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/mockbuild/trace_decorator.py", line 93, in trace result = func(*args, **kw) File "/usr/lib/python3.9/site-packages/mockbuild/util.py", line 600, in do_with_status raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode) mockbuild.exception.Error: Command failed: # bash --login -c /usr/bin/rpmbuild -bb --target riscv64 --nodeps /builddir/build/SPECS/molsketch.spec