diff options
author | Seth R. Johnson <johnsonsr@ornl.gov> | 2022-02-18 23:56:32 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 21:56:32 -0700 |
commit | f33770553fb4d1d38e9e04bd33de9fc86f6788bd (patch) | |
tree | d7fe5034b243db0afad0ea0fb9567e46256dbc81 /var | |
parent | e886a61a6c91a6cdaaf7587b15192087b62570d8 (diff) | |
download | spack-f33770553fb4d1d38e9e04bd33de9fc86f6788bd.tar.gz spack-f33770553fb4d1d38e9e04bd33de9fc86f6788bd.tar.bz2 spack-f33770553fb4d1d38e9e04bd33de9fc86f6788bd.tar.xz spack-f33770553fb4d1d38e9e04bd33de9fc86f6788bd.zip |
Add/remove conflicts for Apple silicon (M1/aarch64) (#28850)
* go: remove broken bootstrapping for macos aarch64
* qt: mark apple silicon conflict
* trilinos: remove apple silicon conflict
* Apply review suggestions
* python: add apple silicon conflict for 2.7
Diffstat (limited to 'var')
5 files changed, 16 insertions, 11 deletions
diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index 3f4f54c22f..92c4d59898 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -35,6 +35,9 @@ class GoBootstrap(Package): depends_on('git', type=('build', 'link', 'run')) + conflicts('target=aarch64:', when='platform=darwin', + msg='Go bootstrap is too old for Apple Silicon') + def patch(self): if self.spec.satisfies('@:1.4.3'): # NOTE: Older versions of Go attempt to download external files that have diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 76a10a997e..daaa1bda47 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -4,7 +4,6 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os -import platform import re import llnl.util.tty as tty @@ -128,12 +127,7 @@ class Go(Package): provides('golang') depends_on('git', type=('build', 'link', 'run')) - # TODO: Make non-c self-hosting compilers feasible without backflips - # should be a dep on external go compiler - if platform.machine() == 'aarch64': - depends_on('gcc languages=go', type='build') - else: - depends_on('go-bootstrap', type='build') + depends_on('go-bootstrap', type='build') # https://github.com/golang/go/issues/17545 patch('time_test.patch', when='@1.6.4:1.7.4') diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 8d33d7ad75..222b3f97a9 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -253,6 +253,9 @@ class Python(AutotoolsPackage): conflicts('%nvhpc') + conflicts('@:2.7', when='platform=darwin target=aarch64:', + msg='Python 2.7 is too old for Apple Silicon') + # Used to cache various attributes that are expensive to compute _config_vars = {} diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index 4b76f6fd70..50940d3d52 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -255,6 +255,8 @@ class Qt(Package): else: conflicts('platform=darwin', when='@:4.8.6', msg="QT 4 for macOS is only patched for 4.8.7") + conflicts('target=aarch64:', when='@:5.15.3', + msg='Apple Silicon requires a very new version of qt') use_xcode = True @@ -267,7 +269,7 @@ class Qt(Package): def url_for_version(self, version): # URL keeps getting more complicated with every release - url = self.list_url.replace('http:', 'https:') + url = self.list_url if version < Version('5.12') and version.up_to(2) != Version('5.9'): # As of 28 April 2021: @@ -721,6 +723,12 @@ class Qt(Package): '-no-alsa', ]) + if spec.satisfies('platform=darwin target=aarch64:'): + # https://www.qt.io/blog/qt-on-apple-silicon + # Not currently working for qt@5 + config_args.extend(['-device-option', + 'QMAKE_APPLE_DEVICE_ARCHS=arm64']) + configure(*config_args) def build(self, spec, prefix): diff --git a/var/spack/repos/builtin/packages/trilinos/package.py b/var/spack/repos/builtin/packages/trilinos/package.py index 150e795362..6bfbb31583 100644 --- a/var/spack/repos/builtin/packages/trilinos/package.py +++ b/var/spack/repos/builtin/packages/trilinos/package.py @@ -294,9 +294,6 @@ class Trilinos(CMakePackage, CudaPackage, ROCmPackage): conflicts('+stokhos', when='%xl') conflicts('+stokhos', when='%xl_r') - # Fortran mangling fails on Apple M1 (see spack/spack#25900) - conflicts('@:13.0.1 +fortran', when='target=m1') - # ###################### Dependencies ########################## depends_on('adios2', when='+adios2') |