summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 2b96ddde3d..324d29ad42 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import itertools
import os
+import platform
import sys
import llnl.util.tty as tty
@@ -12,6 +13,7 @@ from spack import *
from spack.operating_systems.mac_os import macos_version
MACOS_VERSION = macos_version() if sys.platform == 'darwin' else None
+LINUX_VERSION = Version(platform.release()) if platform.system() == 'Linux' else None
class Qt(Package):
@@ -637,6 +639,20 @@ class Qt(Package):
config_args.append('-I{0}/include'.format(spec['libx11'].prefix))
config_args.append('-I{0}/include'.format(spec['xproto'].prefix))
+ # If the version of glibc is new enough Qt will configure features that
+ # may not be supported by the kernel version on the system. This will
+ # cause errors like:
+ # error while loading shared libraries: libQt5Core.so.5: cannot open
+ # shared object file: No such file or directory
+ # Test the kernel version and disable features that Qt detects in glibc
+ # but that are not supported in the kernel as determined by information
+ # in: qtbase/src/corelib/global/minimum-linux_p.h.
+ if LINUX_VERSION and version >= Version('5.10'):
+ if LINUX_VERSION < Version('3.16'):
+ config_args.append('-no-feature-renameat2')
+ if LINUX_VERSION < Version('3.17'):
+ config_args.append('-no-feature-getentropy')
+
if '~webkit' in spec:
config_args.extend([
'-skip',