From 23890470728b8fb3e1255db7c5d402a36aa8904f Mon Sep 17 00:00:00 2001 From: Patrick Gartung Date: Tue, 19 Sep 2023 17:18:34 -0500 Subject: [PATCH] Fix error in qt5.15 building qtlocation with gcc13 (#40091) --- .../repos/builtin/packages/qt/package.py | 3 ++ .../builtin/packages/qt/qt5-15-gcc13.patch | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 var/spack/repos/builtin/packages/qt/qt5-15-gcc13.patch diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index daf4933072..37d8cebc6f 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -155,6 +155,9 @@ class Qt(Package): # causing qt to fail in ci. This increases that limit to 1024. patch("qt59-qtbase-qtconfig256.patch", working_dir="qtbase", when="@5.9:5") + # https://bugzilla.altlinux.org/attachment.cgi?id=13362&action=diff#a/gcc13-compilefix.patch_sec1 + patch("qt5-15-gcc13.patch", when="@5.15: %gcc@13") + conflicts("%gcc@10:", when="@5.9:5.12.6 +opengl") conflicts("%gcc@11:", when="@5.8") conflicts("%apple-clang@13:", when="@:5.13") diff --git a/var/spack/repos/builtin/packages/qt/qt5-15-gcc13.patch b/var/spack/repos/builtin/packages/qt/qt5-15-gcc13.patch new file mode 100644 index 0000000000..b1067a49fe --- /dev/null +++ b/var/spack/repos/builtin/packages/qt/qt5-15-gcc13.patch @@ -0,0 +1,34 @@ +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +index a28c59a4..92d928a3 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/geometry.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include + #include + #include +diff --git a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +index 13498ccb..4dc82a88 100644 +--- a/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp ++++ b/src/3rdparty/mapbox-gl-native/include/mbgl/util/string.hpp +@@ -4,6 +4,7 @@ + #include + #include + #include ++#include + #include + + // Polyfill needed by Qt when building for Android with GCC +diff --git a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +index bc959c9a..2fc62bba 100644 +--- a/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp ++++ b/src/3rdparty/mapbox-gl-native/src/mbgl/gl/stencil_mode.hpp +@@ -1,5 +1,6 @@ + #pragma once + ++#include + #include + + namespace mbgl {