Skip to content

Commit 2ab3cbc

Browse files
authored
Merge pull request #3496 from bedroge/score_p_configure_yes_no_check_fix
fix check in Score-P's configure scripts that may fail if the path to certain dependencies include `yes` or `no`
2 parents 3671c5b + 60633b0 commit 2ab3cbc

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

easybuild/easyblocks/s/score_p.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@
3232
@author: Alexander Grund (TU Dresden)
3333
@author: Christian Feld (Juelich Supercomputing Centre)
3434
"""
35+
import os
36+
3537
import easybuild.tools.toolchain as toolchain
3638
from easybuild.easyblocks.generic.configuremake import ConfigureMake
3739
from easybuild.tools import LooseVersion
3840
from easybuild.tools.build_log import EasyBuildError
3941
from easybuild.tools.environment import unset_env_vars
42+
from easybuild.tools.filetools import apply_regex_substitutions
4043
from easybuild.tools.modules import get_software_root, get_software_libdir
4144

4245

@@ -48,6 +51,22 @@ class EB_Score_minus_P(ConfigureMake):
4851

4952
def configure_step(self, *args, **kwargs):
5053
"""Configure the build, set configure options for compiler, MPI and dependencies."""
54+
55+
if LooseVersion(self.version) >= LooseVersion('8.0') and LooseVersion(self.version) < LooseVersion('8.5'):
56+
# Fix an issue where the configure script would fail if certain dependencies are installed in a path
57+
# that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008.
58+
yes_no_regex = [
59+
(r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'),
60+
(r'_lib}\${with_', '_lib},${with_'),
61+
]
62+
configure_scripts = [
63+
os.path.join(self.start_dir, 'build-backend', 'configure'),
64+
os.path.join(self.start_dir, 'build-mpi', 'configure'),
65+
os.path.join(self.start_dir, 'build-shmem', 'configure'),
66+
]
67+
for configure_script in configure_scripts:
68+
apply_regex_substitutions(configure_script, yes_no_regex)
69+
5170
# Remove some settings from the environment, as they interfere with
5271
# Score-P's configure magic...
5372
unset_env_vars(['CPPFLAGS', 'LDFLAGS', 'LIBS'])

0 commit comments

Comments
 (0)