Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 2024.07.19
# GObject-Introspection sets $LD_LIBRARY_PATH (to many different paths, including $EPREFIX/lib)
# when calling gcc, and this causes a lot of issues for, especially, scripts using /bin/bash.
#
# This rebuild ensures (by using a new EasyBuild hook) that GObject-Introspection will not set
# environment variables that are configured to be filtered by EasyBuild.
#
# See https://github.com/EESSI/software-layer/issues/196
easyconfigs:
- GObject-Introspection-1.74.0-GCCcore-12.2.0.eb
- GObject-Introspection-1.76.1-GCCcore-12.3.0.eb
- GObject-Introspection-1.78.1-GCCcore-13.2.0.eb
19 changes: 19 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,24 @@ def pre_configure_hook_extrae(self, *args, **kwargs):
else:
raise EasyBuildError("Extrae-specific hook triggered for non-Extrae easyconfig?!")


def pre_configure_hook_gobject_introspection(self, *args, **kwargs):
"""
pre-configure hook for GObject-Introspection:
- prevent GObject-Introspection from setting $LD_LIBRARY_PATH if Easybuild is configured to filter it
that are configured to be filtered by EasyBuild, see:
https://github.com/EESSI/software-layer/issues/196
Comment thread
bedroge marked this conversation as resolved.
Outdated
"""
if self.name == 'GObject-Introspection':
# inject a line that removes all items from runtime_path_envvar that are in $EASYBUILD_FILTER_ENVVARS
sed_cmd = r'sed -i "s@\(^\s*runtime_path_envvar = \)\(.*\)@'
sed_cmd += r'\1\2\n\1 [x for x in runtime_path_envvar if not x in os.environ.get(\'EASYBUILD_FILTER_ENV_VARS\', \'\').split(\',\')]@g"'
sed_cmd += ' %(start_dir)s/giscanner/ccompiler.py && '
self.cfg.update('preconfigopts', sed_cmd)
else:
raise EasyBuildError("GObject-Introspection-specific hook triggered for non-GObject-Introspection easyconfig?!")


def pre_configure_hook_gromacs(self, *args, **kwargs):
"""
Pre-configure hook for GROMACS:
Expand Down Expand Up @@ -744,6 +762,7 @@ def inject_gpu_property(ec):
PRE_CONFIGURE_HOOKS = {
'at-spi2-core': pre_configure_hook_atspi2core_filter_ld_library_path,
Comment thread
ocaisa marked this conversation as resolved.
Outdated
'BLIS': pre_configure_hook_BLIS_a64fx,
'GObject-Introspection': pre_configure_hook_gobject_introspection,
'Extrae': pre_configure_hook_extrae,
'GROMACS': pre_configure_hook_gromacs,
'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,
Expand Down