diff options
author | Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> | 2021-11-05 19:06:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 14:06:31 -0400 |
commit | d9d1319442a75a26004cae23c37538f1f6506c25 (patch) | |
tree | ff86feaa6d54b37f9f946e2fffd553569477d9c0 | |
parent | 549bd7044957da6afa90d844cacaa63b1cc22e7c (diff) | |
download | spack-d9d1319442a75a26004cae23c37538f1f6506c25.tar.gz spack-d9d1319442a75a26004cae23c37538f1f6506c25.tar.bz2 spack-d9d1319442a75a26004cae23c37538f1f6506c25.tar.xz spack-d9d1319442a75a26004cae23c37538f1f6506c25.zip |
qt: replace conflicts('%gcc@11:', when='@5.9:5.14') with -include limits (#27241)
Noting that missing numeric_limits was the cause of the compile issues
with gcc-11, I tested adding -include limits fixing @5.9:5.14%gcc@11.
Therefore, we can replace the conflicts('%gcc@11:', when='@5.9:5.14').
Co-authored-by: Bernhard Kaindl <bernhard.kaindl@ait.ac.at>
-rw-r--r-- | var/spack/repos/builtin/packages/qt/package.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 3ae30033dc..2b96ddde3d 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -143,8 +143,7 @@ class Qt(Package): working_dir='qtwebsockets', when='@5.14: %gcc@11:') conflicts('%gcc@10:', when='@5.9:5.12.6 +opengl') - # Error: 'numeric_limits' is not a class template - conflicts('%gcc@11:', when='@5.8:5.14') + conflicts('%gcc@11:', when='@5.8') # Build-only dependencies depends_on("pkgconfig", type='build') @@ -418,6 +417,11 @@ class Qt(Package): filter_file('^QMAKE_LFLAGS_NOUNDEF .*', 'QMAKE_LFLAGS_NOUNDEF = ', conf('g++-unix')) + # https://gcc.gnu.org/gcc-11/porting_to.html: add -include limits + if self.spec.satisfies('@5.9:5.14%gcc@11:'): + with open(conf('gcc-base'), 'a') as f: + f.write("QMAKE_CXXFLAGS += -include limits\n") + if self.spec.satisfies('@4'): # The gnu98 flag is necessary to build with GCC 6 and other modern # compilers (see http://stackoverflow.com/questions/10354371/); |