From b076dd11a837440148e7aed5480b0ed035ac90ef Mon Sep 17 00:00:00 2001 From: crivella Date: Thu, 15 Jan 2026 09:49:57 +0100 Subject: [PATCH 1/6] Add hook to restore filtered deps for Graphviz --- eb_hooks.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 54470ea4..58dac23b 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1054,6 +1054,19 @@ def pre_configure_hook_extrae(self, *args, **kwargs): else: raise EasyBuildError("Extrae-specific hook triggered for non-Extrae easyconfig?!") +def pre_configure_hook_graphviz(self, *args, **kwargs): + """Pre-configure hook for Graphviz: + - avoid undefined $EBROOTZLIB and $EBROOTLIBTOOL env vars during configure step + """ + if self.name == 'Graphviz': + eprefix = get_eessi_envvar('EPREFIX') + + for software in ('zlib', 'libtool'): + var_name = get_software_root_env_var_name(software) + env.setvar(var_name, os.path.join(eprefix, 'usr')) + self.deps.append(software) + else: + raise EasyBuildError("Graphviz-specific hook triggered for non-Graphviz easyconfig?!") def pre_configure_hook_gobject_introspection(self, *args, **kwargs): """ @@ -1815,6 +1828,7 @@ def post_easyblock_hook(self, *args, **kwargs): 'CUDA-Samples': pre_configure_hook_CUDA_Samples_test_remove, 'GObject-Introspection': pre_configure_hook_gobject_introspection, 'Extrae': pre_configure_hook_extrae, + 'Graphviz': pre_configure_hook_graphviz, 'GRASS': pre_configure_hook_grass, 'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic, 'LLVM': pre_configure_hook_llvm, From 88f5b6d8eca00acb0ab66c4edf5cac32bb9aa4ce Mon Sep 17 00:00:00 2001 From: crivella Date: Thu, 15 Jan 2026 14:16:35 +0100 Subject: [PATCH 2/6] Fix wrong line --- eb_hooks.py | 1 - 1 file changed, 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 58dac23b..4fa6c221 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1064,7 +1064,6 @@ def pre_configure_hook_graphviz(self, *args, **kwargs): for software in ('zlib', 'libtool'): var_name = get_software_root_env_var_name(software) env.setvar(var_name, os.path.join(eprefix, 'usr')) - self.deps.append(software) else: raise EasyBuildError("Graphviz-specific hook triggered for non-Graphviz easyconfig?!") From 062d6c6cd9d31ca2cff7133516a56333a974a933 Mon Sep 17 00:00:00 2001 From: crivella Date: Thu, 15 Jan 2026 14:39:32 +0100 Subject: [PATCH 3/6] Fix also hardcoded `/lib` to `/lib64` in the configopts --- eb_hooks.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 4fa6c221..7cf16f29 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1060,10 +1060,27 @@ def pre_configure_hook_graphviz(self, *args, **kwargs): """ if self.name == 'Graphviz': eprefix = get_eessi_envvar('EPREFIX') + usr_dir = os.path.join(eprefix, 'usr') for software in ('zlib', 'libtool'): var_name = get_software_root_env_var_name(software) - env.setvar(var_name, os.path.join(eprefix, 'usr')) + env.setvar(var_name, usr_dir) + + old_configopts = self.cfg['configopts'] + old_items = set(filter(None, old_configopts.split(' '))) + + # Replace --with-ltdl-lib and --with-zlibdir options defined in the EC to point to compat layer + lib_dir = os.path.join(usr_dir, 'lib64') + new_items = { + f'--with-ltdl-lib={lib_dir}', + f'--with-zlibdir={lib_dir}', + } + for item in old_items: + if item.startswith('--with-ltdl-lib') or item.startswith('-with-ltdl-lib'): + continue + new_items.add(item) + + self.cfg['configopts'] = ' '.join(new_items) else: raise EasyBuildError("Graphviz-specific hook triggered for non-Graphviz easyconfig?!") From de30136f887c2bb5c749ddefeaf6d6fc96d11a6b Mon Sep 17 00:00:00 2001 From: Davide Grassano <34096612+Crivella@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:26:48 +0100 Subject: [PATCH 4/6] Update eb_hooks.py Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- eb_hooks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eb_hooks.py b/eb_hooks.py index 7cf16f29..e50078ba 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1075,6 +1075,7 @@ def pre_configure_hook_graphviz(self, *args, **kwargs): f'--with-ltdl-lib={lib_dir}', f'--with-zlibdir={lib_dir}', } + # Add to the new_items all the old items except the `--with-ltdl-lib` and `--with-ltdl-lib` for which we already defined new values above for item in old_items: if item.startswith('--with-ltdl-lib') or item.startswith('-with-ltdl-lib'): continue From 75ffb0ced38978ec11a13cd024f5aeeab5bd110c Mon Sep 17 00:00:00 2001 From: Davide Grassano <34096612+Crivella@users.noreply.github.com> Date: Tue, 27 Jan 2026 15:31:14 +0100 Subject: [PATCH 5/6] Update eb_hooks.py Co-authored-by: Caspar van Leeuwen <33718780+casparvl@users.noreply.github.com> --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index e50078ba..edc54798 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1077,7 +1077,7 @@ def pre_configure_hook_graphviz(self, *args, **kwargs): } # Add to the new_items all the old items except the `--with-ltdl-lib` and `--with-ltdl-lib` for which we already defined new values above for item in old_items: - if item.startswith('--with-ltdl-lib') or item.startswith('-with-ltdl-lib'): + if item.startswith('--with-ltdl-lib') or item.startswith('--with-zlibdir'): continue new_items.add(item) From a394fd2a47a030bcaf096f8daaca911f1c59f893 Mon Sep 17 00:00:00 2001 From: crivella Date: Tue, 27 Jan 2026 16:56:10 +0100 Subject: [PATCH 6/6] Fix to only add libdirs if they are in the easyconfig --- eb_hooks.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index edc54798..2165e248 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1071,15 +1071,16 @@ def pre_configure_hook_graphviz(self, *args, **kwargs): # Replace --with-ltdl-lib and --with-zlibdir options defined in the EC to point to compat layer lib_dir = os.path.join(usr_dir, 'lib64') - new_items = { - f'--with-ltdl-lib={lib_dir}', - f'--with-zlibdir={lib_dir}', - } - # Add to the new_items all the old items except the `--with-ltdl-lib` and `--with-ltdl-lib` for which we already defined new values above + new_items = set() + # Add to the new_items all the old items except the `--with-ltdl-lib` and `--with-ltdl-lib` for + # which we fix the lib dir to lib64 instead of lib for item in old_items: - if item.startswith('--with-ltdl-lib') or item.startswith('--with-zlibdir'): - continue - new_items.add(item) + if item.startswith('--with-ltdl-lib'): + new_items.add(f'--with-ltdl-lib={lib_dir}') + elif item.startswith('--with-zlibdir'): + new_items.add(f'--with-zlibdir={lib_dir}') + else: + new_items.add(item) self.cfg['configopts'] = ' '.join(new_items) else: