From 6b7efa90f35a71c6be2ccc37096915f8a1f57225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 29 Oct 2024 09:40:07 +0100 Subject: [PATCH] specifically check for yes|no in configure scripts --- easybuild/easyblocks/s/score_p.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/easybuild/easyblocks/s/score_p.py b/easybuild/easyblocks/s/score_p.py index 8d70d10360..b6993a07b9 100644 --- a/easybuild/easyblocks/s/score_p.py +++ b/easybuild/easyblocks/s/score_p.py @@ -32,11 +32,17 @@ @author: Alexander Grund (TU Dresden) @author: Christian Feld (Juelich Supercomputing Centre) """ +import glob +import os + +from easybuild.tools import LooseVersion + import easybuild.tools.toolchain as toolchain from easybuild.easyblocks.generic.configuremake import ConfigureMake from easybuild.tools import LooseVersion from easybuild.tools.build_log import EasyBuildError from easybuild.tools.environment import unset_env_vars +from easybuild.tools.filetools import apply_regex_substitutions from easybuild.tools.modules import get_software_root, get_software_libdir @@ -48,6 +54,16 @@ class EB_Score_minus_P(ConfigureMake): def configure_step(self, *args, **kwargs): """Configure the build, set configure options for compiler, MPI and dependencies.""" + + if LooseVersion(self.version) >= LooseVersion('8.0') and LooseVersion(self.version) < LooseVersion('8.5'): + # Let configure scripts specifically check for yes|no instead of *yes*|*no*, + # to prevent errors for certain dependencies installed in a path that includes "yes" or "no" + # see https://gitlab.com/score-p/scorep/-/issues/1008 + yes_no_regex = (r'\*yes\*\|\*no\*', r'yes|no') + configure_scripts = glob.glob(os.path.join(self.start_dir, 'build-*', 'configure')) + for configure_script in configure_scripts: + apply_regex_substitutions(configure_script, [yes_no_regex]) + # Remove some settings from the environment, as they interfere with # Score-P's configure magic... unset_env_vars(['CPPFLAGS', 'LDFLAGS', 'LIBS'])