Ultimaker / cura-build-environment

CMake project to build dependencies for Cura
GNU Affero General Public License v3.0
24 stars 55 forks source link

Compiling Qt 5.10.1 fails with GCC 9 #83

Closed jellespijker closed 4 years ago

jellespijker commented 4 years ago

See commit https://codereview.qt-project.org/c/qt/qtbase/+/245425 and the used diff file below

From a52d7861edfb5956de38ba80015c4dd0b596259b Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Tue, 13 Nov 2018 16:00:23 +0100
Subject: [PATCH] Fix compile issue with gcc 9

It appears messenne_twisters in the latest libstdc++ has one more
requirement before it is willing to construct with our
SystemGenerator struct as an sseq provider.

Change-Id: If38151d1fa6f40a80274acc26d9ed6b4ac6049fe
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
---

diff --git a/src/corelib/global/qrandom.cpp b/src/corelib/global/qrandom.cpp
index 23e5e49..03534cf 100644
--- a/src/corelib/global/qrandom.cpp
+++ b/src/corelib/global/qrandom.cpp
@@ -218,6 +218,7 @@
 #endif // Q_OS_WINRT

     static SystemGenerator &self();
+    typedef quint32 result_type;
     void generate(quint32 *begin, quint32 *end) Q_DECL_NOEXCEPT_EXPR(FillBufferNoexcept);

     // For std::mersenne_twister_engine implementations that use something
Ghostkeeper commented 4 years ago

So this has been fixed in Qt 5.12, according to the site you linked. We can't update to Qt 5.12 at the moment, since that would drop support for old operating systems (in particular MacOS versions that are still in use by a decent fraction of our users according to our anonymous stats). Luckily the compiler we're using in our build system is still older (GCC 4.9 is still the official version we're using, though our CI system uses 8.1 iirc), so we're not facing this problem. So I guess our official answer is going to be to use GCC 8 or use pre-compiled binaries for Qt.

Sorry.