Skip to content

Commit 062d6c6

Browse files
committed
Fix also hardcoded /lib to /lib64 in the configopts
1 parent 88f5b6d commit 062d6c6

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

eb_hooks.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,10 +1060,27 @@ def pre_configure_hook_graphviz(self, *args, **kwargs):
10601060
"""
10611061
if self.name == 'Graphviz':
10621062
eprefix = get_eessi_envvar('EPREFIX')
1063+
usr_dir = os.path.join(eprefix, 'usr')
10631064

10641065
for software in ('zlib', 'libtool'):
10651066
var_name = get_software_root_env_var_name(software)
1066-
env.setvar(var_name, os.path.join(eprefix, 'usr'))
1067+
env.setvar(var_name, usr_dir)
1068+
1069+
old_configopts = self.cfg['configopts']
1070+
old_items = set(filter(None, old_configopts.split(' ')))
1071+
1072+
# Replace --with-ltdl-lib and --with-zlibdir options defined in the EC to point to compat layer
1073+
lib_dir = os.path.join(usr_dir, 'lib64')
1074+
new_items = {
1075+
f'--with-ltdl-lib={lib_dir}',
1076+
f'--with-zlibdir={lib_dir}',
1077+
}
1078+
for item in old_items:
1079+
if item.startswith('--with-ltdl-lib') or item.startswith('-with-ltdl-lib'):
1080+
continue
1081+
new_items.add(item)
1082+
1083+
self.cfg['configopts'] = ' '.join(new_items)
10671084
else:
10681085
raise EasyBuildError("Graphviz-specific hook triggered for non-Graphviz easyconfig?!")
10691086

0 commit comments

Comments
 (0)