summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGlenn Johnson <glenn-johnson@uiowa.edu>2020-01-08 13:02:37 -0600
committerAdam J. Stewart <ajstewart426@gmail.com>2020-01-08 13:02:37 -0600
commit4a84155caa9a81029d05927f326772d018eeb7be (patch)
treeae200760db70329e89795dad8359b7786e408b42 /var
parentf79649d2e3cf7f6e2f56ffb45618945b1058fb2f (diff)
downloadspack-4a84155caa9a81029d05927f326772d018eeb7be.tar.gz
spack-4a84155caa9a81029d05927f326772d018eeb7be.tar.bz2
spack-4a84155caa9a81029d05927f326772d018eeb7be.tar.xz
spack-4a84155caa9a81029d05927f326772d018eeb7be.zip
fix build for qt5 and the Intel compiler (#14387)
* Set conflicts for qt5 and the Intel compiler This PR sets a `conflicts` statement for QT5 and the Intel compiler. * New patches for intel compiles This commit adds two patches to get QT5 to compile with the intel compilers. The two patches are very similar but the file being patched was changed substantially between qt-5.11 and qt-5.12. The patch checks versions of both GCC and Intel compilers to know when to use overflow builtis. Essentially, GCC must be >= 5 and Intel must be >= 18. The sqlite dependency needs the `+column_metadata` variant when the Intel compiler is used. That is made conditional on the compiler but it might make sense to make that the default for the sqlite dependency. Some other changes were made based on testing builds of various QT5 versions with several Intel compilers. - The libxext dependency is still needed for QT5 - A dependency on libxrender is needed - The gtk option format needs to be constrained at the qt@5.7 level, not qt@5.8. - An extra configure option is needed for the sql plugins RPATH
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/qt/package.py16
-rw-r--r--var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch11
-rw-r--r--var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch11
3 files changed, 35 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py
index 44b0b35b42..f443c7800f 100644
--- a/var/spack/repos/builtin/packages/qt/package.py
+++ b/var/spack/repos/builtin/packages/qt/package.py
@@ -117,6 +117,10 @@ class Qt(Package):
patch('qt4-gcc8.3-asm-volatile-fix.patch', when='@4')
patch('qt5-gcc8.3-asm-volatile-fix.patch', when='@5.0.0:5.12.1')
+ # patch overflow builtins
+ patch('qt5_11-intel-overflow.patch', when='@5.11')
+ patch('qt5_12-intel-overflow.patch', when='@5.12:')
+
# Build-only dependencies
depends_on("pkgconfig", type='build')
depends_on("flex", when='+webkit', type='build')
@@ -135,6 +139,7 @@ class Qt(Package):
depends_on("gtkplus", when='+gtk')
depends_on("openssl", when='+ssl')
depends_on("sqlite", when='+sql', type=('build', 'run'))
+ depends_on("sqlite+column_metadata", when='+sql%intel', type=('build', 'run'))
depends_on("libpng@1.2.57", when='@3')
depends_on("pcre+multibyte", when='@5.0:5.8')
@@ -160,7 +165,8 @@ class Qt(Package):
depends_on("xcb-util-keysyms")
depends_on("xcb-util-renderutil")
depends_on("xcb-util-wm")
- depends_on("libxext", when='@3:4.99')
+ depends_on("libxext")
+ depends_on("libxrender")
conflicts('+framework',
msg="QT cannot be built as a framework except on macOS.")
else:
@@ -342,7 +348,11 @@ class Qt(Package):
config_args.append('-no-openssl')
if '+sql' in self.spec:
- config_args.append('-system-sqlite')
+ sqlite = self.spec['sqlite']
+ config_args.extend([
+ '-system-sqlite',
+ '-R', '{0}'.format(sqlite.prefix.lib),
+ ])
else:
comps = ['db2', 'ibase', 'oci', 'tds', 'mysql', 'odbc', 'psql',
'sqlite', 'sqlite2']
@@ -504,7 +514,7 @@ class Qt(Package):
'-no-directfb',
'-{0}gtk{1}'.format(
'' if '+gtk' in spec else 'no-',
- '' if version >= Version('5.8') else 'style')
+ '' if version >= Version('5.7') else 'style')
])
if MACOS_VERSION:
diff --git a/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch b/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch
new file mode 100644
index 0000000000..5bb0b1e03e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt5_11-intel-overflow.patch
@@ -0,0 +1,11 @@
+--- a/qtbase/src/corelib/global/qnumeric_p.h 2018-11-25 06:51:11.000000000 -0600
++++ b/qtbase/src/corelib/global/qnumeric_p.h 2020-01-07 14:13:12.103818264 -0600
+@@ -168,7 +168,7 @@
+ // size_t. Implementations for 8- and 16-bit types will work but may not be as
+ // efficient. Implementations for 64-bit may be missing on 32-bit platforms.
+
+-#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflowx)
++#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) && !defined(Q_CC_INTEL) || (defined(Q_CC_INTEL) && (Q_CC_INTEL >= 1800) && (Q_CC_GNU >= 500) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflowx)
+ // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows
+
+ template <typename T> inline
diff --git a/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch b/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch
new file mode 100644
index 0000000000..bfe5c8e4f3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/qt/qt5_12-intel-overflow.patch
@@ -0,0 +1,11 @@
+--- a/qtbase/src/corelib/global/qnumeric_p.h 2019-08-31 03:29:31.000000000 -0500
++++ b/qtbase/src/corelib/global/qnumeric_p.h 2020-01-06 14:23:40.719851927 -0600
+@@ -231,7 +231,7 @@
+ // size_t. Implementations for 8- and 16-bit types will work but may not be as
+ // efficient. Implementations for 64-bit may be missing on 32-bit platforms.
+
+-#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) || (defined(Q_CC_INTEL) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflow)
++#if (defined(Q_CC_GNU) && (Q_CC_GNU >= 500) && !defined(Q_CC_INTEL) || (defined(Q_CC_INTEL) && (Q_CC_INTEL >= 1800) && (Q_CC_GNU >= 500) && !defined(Q_OS_WIN))) || QT_HAS_BUILTIN(__builtin_add_overflow)
+ // GCC 5, ICC 18, and Clang 3.8 have builtins to detect overflows
+
+ template <typename T> inline