Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix check in Score-P's configure scripts that may fail if the path to certain dependencies include yes or no #3496

Merged
19 changes: 19 additions & 0 deletions easybuild/easyblocks/s/score_p.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@
@author: Alexander Grund (TU Dresden)
@author: Christian Feld (Juelich Supercomputing Centre)
"""
import os

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


Expand All @@ -48,6 +51,22 @@ 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'):
# Fix an issue where the configure script would fail if certain dependencies are installed in a path
# that includes "yes" or "no", see https://gitlab.com/score-p/scorep/-/issues/1008.
yes_no_regex = [
(r'\*yes\*\|\*no\*', 'yes,*|no,*|*,yes|*,no'),
(r'_lib}\${with_', '_lib},${with_'),
]
configure_scripts = [
os.path.join(self.start_dir, 'build-backend', 'configure'),
os.path.join(self.start_dir, 'build-mpi', 'configure'),
os.path.join(self.start_dir, 'build-shmem', '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'])
Expand Down
Loading