From ddc79ce4dfc6eb272e88b64f50ab2550a965ac32 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Mon, 6 Jul 2020 19:53:02 +0200 Subject: [PATCH] autotools bugfix: handle missing config.guess (#17356) Spack was attempting to calculate abspath on the located config.guess path even when it was not found (None); this commit skips the abspath calculation when config.guess is not found. --- lib/spack/spack/build_systems/autotools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 13cb3b5cb28..01d96b4633f 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -122,10 +122,10 @@ def _do_patch_config_files(self): # Then search in all sub directories recursively. # We would like to use AC_CONFIG_AUX_DIR, but not all packages # ship with their configure.in or configure.ac. - config_path = next((os.path.join(r, f) + config_path = next((os.path.abspath(os.path.join(r, f)) for r, ds, fs in os.walk('.') for f in fs if f == config_file), None) - my_config_files[config_name] = os.path.abspath(config_path) + my_config_files[config_name] = config_path if my_config_files[config_name] is not None: try: