summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2021-09-15 07:44:16 +0200
committerGitHub <noreply@github.com>2021-09-14 22:44:16 -0700
commitc52426ea7a17a60dd1f4e6d8aeaa4ead157badc7 (patch)
tree31a0b0feefa1956782be89900838183f299b5491 /lib
parent0d0d438c119a770ba1d9db3126df1993b70448ca (diff)
downloadspack-c52426ea7a17a60dd1f4e6d8aeaa4ead157badc7.tar.gz
spack-c52426ea7a17a60dd1f4e6d8aeaa4ead157badc7.tar.bz2
spack-c52426ea7a17a60dd1f4e6d8aeaa4ead157badc7.tar.xz
spack-c52426ea7a17a60dd1f4e6d8aeaa4ead157badc7.zip
Make clingo the default solver (#25502)
Modifications: - [x] Change `defaults/config.yaml` - [x] Add a fix for bootstrapping patchelf from sources if `compilers.yaml` is empty - [x] Make `SPACK_TEST_SOLVER=clingo` the default for unit-tests - [x] Fix package failures in the e4s pipeline Caveats: 1. CentOS 6 still uses the original concretizer as it can't connect to the buildcache due to issues with `ssl` (bootstrapping from sources requires a C++14 capable compiler) 1. I had to update the image tag for GitlabCI in e699f14. 1. libtool v2.4.2 has been deprecated and other packages received some update
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/bootstrap.py10
-rw-r--r--lib/spack/spack/test/conftest.py2
2 files changed, 11 insertions, 1 deletions
diff --git a/lib/spack/spack/bootstrap.py b/lib/spack/spack/bootstrap.py
index efcb8a7e19..e95afd8adc 100644
--- a/lib/spack/spack/bootstrap.py
+++ b/lib/spack/spack/bootstrap.py
@@ -489,6 +489,16 @@ def _bootstrap_config_scopes():
@contextlib.contextmanager
def ensure_bootstrap_configuration():
+ # We may need to compile code from sources, so ensure we have compilers
+ # for the current platform before switching parts.
+ arch = spack.architecture.default_arch()
+ arch = spack.spec.ArchSpec(str(arch)) # The call below expects an ArchSpec object
+ if not spack.compilers.compilers_for_arch(arch):
+ compiler_cmd = spack.main.SpackCommand('compiler')
+ compiler_cmd(
+ 'find', output=os.devnull, error=os.devnull, fail_on_error=False
+ )
+
bootstrap_store_path = store_path()
with spack.environment.deactivate_environment():
with spack.architecture.use_platform(spack.architecture.real_platform()):
diff --git a/lib/spack/spack/test/conftest.py b/lib/spack/spack/test/conftest.py
index cd6ce907e7..456624127a 100644
--- a/lib/spack/spack/test/conftest.py
+++ b/lib/spack/spack/test/conftest.py
@@ -585,7 +585,7 @@ def configuration_dir(tmpdir_factory, linux_os):
tmpdir.ensure('user', dir=True)
# Slightly modify config.yaml and compilers.yaml
- solver = os.environ.get('SPACK_TEST_SOLVER', 'original')
+ solver = os.environ.get('SPACK_TEST_SOLVER', 'clingo')
config_yaml = test_config.join('config.yaml')
modules_root = tmpdir_factory.mktemp('share')
tcl_root = modules_root.ensure('modules', dir=True)