From 02bea6d2d254921f47291669454280f0dd87db70 Mon Sep 17 00:00:00 2001 From: Hao Lyu <20434183+IncubatorShokuhou@users.noreply.github.com> Date: Wed, 27 Oct 2021 05:12:58 +0800 Subject: [PATCH] fix bug when there is version id in the path of compiler (#26916) --- var/spack/repos/builtin/packages/wrf/package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/spack/repos/builtin/packages/wrf/package.py b/var/spack/repos/builtin/packages/wrf/package.py index 609dadde12c..69a5a7fb607 100644 --- a/var/spack/repos/builtin/packages/wrf/package.py +++ b/var/spack/repos/builtin/packages/wrf/package.py @@ -197,8 +197,8 @@ def answer_configure_question(self, outputbuf): if "Please select from among the following" in outputbuf: options = collect_platform_options(outputbuf) comp_pair = "%s/%s" % ( - basename(self.compiler.fc), - basename(self.compiler.cc), + basename(self.compiler.fc).split("-")[0], + basename(self.compiler.cc).split("-")[0], ) compiler_matches = dict( (x, y) for x, y in options.items() if comp_pair in x.lower()