diff options
author | Gregory Becker <becker33@llnl.gov> | 2016-08-01 17:16:06 -0700 |
---|---|---|
committer | Gregory Becker <becker33@llnl.gov> | 2016-08-01 17:16:06 -0700 |
commit | 31042e8ed10a8464b1a6cbbc165be8ca7e9510bc (patch) | |
tree | 7b85c66755a2d31e4fbf72bc2763f6d83959ce9b /lib | |
parent | 2705f2c0e3c92aa4c0a099bac3b973d1bf229663 (diff) | |
download | spack-31042e8ed10a8464b1a6cbbc165be8ca7e9510bc.tar.gz spack-31042e8ed10a8464b1a6cbbc165be8ca7e9510bc.tar.bz2 spack-31042e8ed10a8464b1a6cbbc165be8ca7e9510bc.tar.xz spack-31042e8ed10a8464b1a6cbbc165be8ca7e9510bc.zip |
further improved error message
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/concretize.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py index 71f734ebfb..4fafee3a83 100644 --- a/lib/spack/spack/concretize.py +++ b/lib/spack/spack/concretize.py @@ -336,14 +336,16 @@ class DefaultConcretizer(object): spack.pkgsort.compiler_compare, other_spec.name) matches = sorted(compiler_list, cmp=cmp_compilers) if not matches: - raise UnavailableCompilerVersionError(other_compiler) + raise UnavailableCompilerVersionError(other_compiler, + spec.architecture.operating_system) # copy concrete version into other_compiler index = 0 while not _proper_compiler_style(matches[index], spec.architecture): index += 1 if index == len(matches) - 1: - raise UnavailableCompilerVersionError(spec) + raise UnavailableCompilerVersionError(spec.compiler, + spec.architecture.operating_system) spec.compiler = matches[index].copy() assert(spec.compiler.concrete) return True # things changed. @@ -489,9 +491,9 @@ class UnavailableCompilerVersionError(spack.error.SpackError): """Raised when there is no available compiler that satisfies a compiler spec.""" - def __init__(self, compiler_spec): + def __init__(self, compiler_spec, operating_system): super(UnavailableCompilerVersionError, self).__init__( - "No available compiler version matches '%s'" % compiler_spec, + "No available compiler version matches '%s' on operating_system %s" % compiler_spec, operating_system, # NOQA: ignore=E501 "Run 'spack compilers' to see available compiler Options.") |