diff --git a/easybuild/easyblocks/generic/configuremake.py b/easybuild/easyblocks/generic/configuremake.py index adbc12d385..af62797129 100644 --- a/easybuild/easyblocks/generic/configuremake.py +++ b/easybuild/easyblocks/generic/configuremake.py @@ -49,7 +49,7 @@ from easybuild.tools.config import source_paths, build_option, ERROR, IGNORE, WARN from easybuild.tools.filetools import CHECKSUM_TYPE_SHA256, adjust_permissions, compute_checksum, download_file from easybuild.tools.filetools import read_file, remove_file -from easybuild.tools.run import extract_errors_from_log, run_shell_cmd +from easybuild.tools.run import run_shell_cmd from easybuild.tools.utilities import nub # string that indicates that a configure script was generated by Autoconf @@ -338,8 +338,8 @@ def configure_step(self, cmd_prefix=''): raise EasyBuildError('Invalid value for `unrecognized_configure_options`: %s. Must be one of: ', action, ', '.join(valid_actions)) if action != IGNORE: - unrecognized_options_str = 'configure: WARNING: unrecognized options:' - unrecognized_options = extract_errors_from_log(res.output, unrecognized_options_str)[1] + unrecognized_options_str = "^configure: WARNING: unrecognized options:" + unrecognized_options = re.findall(rf"{unrecognized_options_str}.*", res.output, flags=re.I | re.M) # Keep only unique options (remove the warning string and strip whitespace) unrecognized_options = nub(x.split(unrecognized_options_str)[-1].strip() for x in unrecognized_options) if unrecognized_options: