mcallegari / qlcplus

Q Light Controller Plus (QLC+) is a free and cross-platform software to control DMX or analog lighting systems like moving heads, dimmers, scanners etc. This project is a fork of the great QLC project written by Heikki Junnila that aims to continue the QLC development and to introduce new features.
Apache License 2.0
918 stars 349 forks source link

Build issue on Arch with GCC 14 #1565

Closed mcallegari closed 1 month ago

mcallegari commented 1 month ago

Apparently Arch did it again. They updated the GCC version and broke QLC+ build (and probably a few other thousand packages out there..) The issue is actually in Qt5:

[  230s] make[3]: Entering directory '/usr/src/packages/BUILD/qlcplus-qt5-git/src/qlcplus-qt5-git-4.13.1.20240511.a1f6cd7/engine/test/bus'
[  230s] g++ -c -pipe -Werror -Wno-unused-local-typedefs -g -Wall -Wextra -D_REENTRANT -fPIC -DQT_GUI_LIB -DQT_TESTLIB_LIB -DQT_CORE_LIB -DQT_TESTCASE_BUILDDIR='"/usr/src/packages/BUILD/qlcplus-qt5-git/src/qlcplus-qt5-git-4.13.1.20240511.a1f6cd7/engine/test/bus"' -I. -I../../../plugins/interfaces -I../../src -I/usr/include/qt -I/usr/include/qt/QtGui -I/usr/include/qt/QtTest -I/usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o bus_test.o bus_test.cpp
[  231s] In file included from /usr/include/qt/QtCore/qfuture.h:45,
[  231s]                  from /usr/include/qt/QtCore/QtCore:97,
[  231s]                  from /usr/include/qt/QtTest/QtTestDepends:3,
[  231s]                  from /usr/include/qt/QtTest/QtTest:3,
[  231s]                  from bus_test.cpp:21:
[  231s] /usr/include/qt/QtCore/qfutureinterface.h:284:37: error: template-id not allowed for constructor in C++20 [-Werror=template-id-cdtor]
[  231s]   284 |     explicit QFutureInterface<void>(State initialState = NoState)
[  231s]       |                                     ^~~~~
[  231s] /usr/include/qt/QtCore/qfutureinterface.h:284:37: note: remove the '< >'
[  232s] cc1plus: all warnings being treated as errors
[  232s] make[3]: *** [Makefile:447: bus_test.o] Error 1

The easiest solution is probably to add the flag -Wno-template-id-cdtor but of course it affects the whole QLC+ build. I believe the KDE guys will apply a patch to this quite soon and deliver a Qt 5.15.x build with the fix.

@jeromelebleu have you already seen this? Any suggestion/comment?

jeromelebleu commented 1 month ago

I have a tiny and far memory of template-id error but can't remember for what… And Debian is still using GCC 13, I could not help I guess sorry about that.

I have switched to Qt 6 in the Debian package by the way and it is building and working fine. I just wait for your answer to this message which is asking if you plan to release a 4.13.1 version soon before updating the package - to prevent several patches. Thanks!

mcallegari commented 1 month ago

I am considering to release 4.13.1 but since it takes me a whole day to do it, I don't know when I can do it. I'll try to do it soon. QLC+ v4 on Qt6 is not ready yet. Please don't make any official build with Qt6 yet. I have found a lot of deprecations that broke UI signals therefore making is unusable in some places. (see my latest patch for combo boxes!)

jeromelebleu commented 1 month ago

I am considering to release 4.13.1 but since it takes me a whole day to do it, I don't know when I can do it. I'll try to do it soon.

Thanks! It was not to rush you but just to know if I wait for it or not.

QLC+ v4 on Qt6 is not ready yet. Please don't make any official build with Qt6 yet. I have found a lot of deprecations that broke UI signals therefore making is unusable in some places. (see my latest patch for combo boxes!)

Oops, I missed that, I will rollback to Qt 5 so…

mcallegari commented 1 month ago

This is fixed for now. The problem will probably come out again when cmake is the default for every build platform