32
32
@author: Alexander Grund (TU Dresden)
33
33
@author: Christian Feld (Juelich Supercomputing Centre)
34
34
"""
35
+ import os
36
+
35
37
import easybuild .tools .toolchain as toolchain
36
38
from easybuild .easyblocks .generic .configuremake import ConfigureMake
37
39
from easybuild .tools import LooseVersion
38
40
from easybuild .tools .build_log import EasyBuildError
39
41
from easybuild .tools .environment import unset_env_vars
42
+ from easybuild .tools .filetools import apply_regex_substitutions
40
43
from easybuild .tools .modules import get_software_root , get_software_libdir
41
44
42
45
@@ -48,6 +51,22 @@ class EB_Score_minus_P(ConfigureMake):
48
51
49
52
def configure_step (self , * args , ** kwargs ):
50
53
"""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
+
51
70
# Remove some settings from the environment, as they interfere with
52
71
# Score-P's configure magic...
53
72
unset_env_vars (['CPPFLAGS' , 'LDFLAGS' , 'LIBS' ])
0 commit comments