summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2016-08-01 17:30:03 -0700
committerGitHub <noreply@github.com>2016-08-01 17:30:03 -0700
commitbb5dd49206e98f066d211b6a0f5a408b209ef2aa (patch)
treebd9b2f55f8f2f0acb15d4bf9cc0fa6c5b8ebf3c9
parentc678a9e3daafb8168307a43c8c27e26a00f0574c (diff)
parent679ceabf36bbe87e853141dd86936bc5cda4a337 (diff)
downloadspack-bb5dd49206e98f066d211b6a0f5a408b209ef2aa.tar.gz
spack-bb5dd49206e98f066d211b6a0f5a408b209ef2aa.tar.bz2
spack-bb5dd49206e98f066d211b6a0f5a408b209ef2aa.tar.xz
spack-bb5dd49206e98f066d211b6a0f5a408b209ef2aa.zip
Merge pull request #1419 from LLNL/bugfix-compiler-error-message
Bugfix compiler error message
-rw-r--r--lib/spack/spack/concretize.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 5180f3cf04..eced9917c9 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -336,14 +336,18 @@ class DefaultConcretizer(object):
spack.pkgsort.compiler_compare, other_spec.name)
matches = sorted(compiler_list, cmp=cmp_compilers)
if not matches:
- raise UnavailableCompilerVersionError(other_compiler)
+ arch = spec.architecture
+ raise UnavailableCompilerVersionError(other_compiler,
+ arch.platform_os)
# 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 NoValidVersionError(spec)
+ arch = spec.architecture
+ raise UnavailableCompilerVersionError(spec.compiler,
+ arch.platform_os)
spec.compiler = matches[index].copy()
assert(spec.compiler.concrete)
return True # things changed.
@@ -489,9 +493,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.")