From 67e6a258860325c3242e22939c0df9f91c07334e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 16 Jan 2024 14:02:14 +0100 Subject: [PATCH 1/5] add at-spi2-core-2.49.91-GCCcore-12.3.0.eb --- .../software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023a.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023a.yml b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023a.yml index e33a8af48c..1586c16827 100644 --- a/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023a.yml +++ b/easystacks/software.eessi.io/2023.06/eessi-2023.06-eb-4.9.0-2023a.yml @@ -2,3 +2,4 @@ easyconfigs: - OpenFOAM-11-foss-2023a.eb: options: from-pr: 19545 + - at-spi2-core-2.49.91-GCCcore-12.3.0.eb From b49ce5d7929c64687acb8e114ae4938f232647db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 16 Jan 2024 14:12:40 +0100 Subject: [PATCH 2/5] add pre-configure hook for at-spi2-core --- eb_hooks.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 7c52e24ff1..ff9072c793 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -335,6 +335,19 @@ def pre_configure_hook_LAMMPS_aarch64(self, *args, **kwargs): raise EasyBuildError("LAMMPS-specific hook triggered for non-LAMMPS easyconfig?!") +def pre_configure_hook_atspi2core_filter_ld_library_path(self, *args, **kwargs): + """ + pre-configure hook for at-spi2-core: + - instruct GObject-Introspection's g-ir-scanner tool to not set $LD_LIBRARY_PATH + when EasyBuild is configured to filter it + """ + if self.name == 'at-spi2-core': + if build_option('filter_env_vars') and 'LD_LIBRARY_PATH' in build_option('filter_env_vars'): + self.cfg.update('preconfigopts', 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && ') + else: + raise EasyBuildError("at-spi2-core-specific hook triggered for non-at-spi2-core easyconfig?!") + + def pre_test_hook(self,*args, **kwargs): """Main pre-test hook: trigger custom functions based on software name.""" if self.name in PRE_TEST_HOOKS: @@ -551,6 +564,7 @@ def inject_gpu_property(ec): 'OpenBLAS': pre_configure_hook_openblas_optarch_generic, 'WRF': pre_configure_hook_wrf_aarch64, 'LAMMPS': pre_configure_hook_LAMMPS_aarch64, + 'at-spi2-core': pre_configure_hook_atspi2core_filter_ld_library_path, } PRE_TEST_HOOKS = { From 23aa7ce5e0e59f2280cbc5feda7e3f213788b9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 16 Jan 2024 14:18:42 +0100 Subject: [PATCH 3/5] split long line --- eb_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index ff9072c793..c63121afad 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -343,7 +343,8 @@ def pre_configure_hook_atspi2core_filter_ld_library_path(self, *args, **kwargs): """ if self.name == 'at-spi2-core': if build_option('filter_env_vars') and 'LD_LIBRARY_PATH' in build_option('filter_env_vars'): - self.cfg.update('preconfigopts', 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && ') + sed_cmd = 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && ') + self.cfg.update('preconfigopts', sed_cmd) else: raise EasyBuildError("at-spi2-core-specific hook triggered for non-at-spi2-core easyconfig?!") From 75bf2dec2d333df9bf0bee84116f0ea9bdce5d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 16 Jan 2024 14:58:29 +0100 Subject: [PATCH 4/5] fix syntax, remove ) --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index c63121afad..a9169d60b8 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -343,7 +343,7 @@ def pre_configure_hook_atspi2core_filter_ld_library_path(self, *args, **kwargs): """ if self.name == 'at-spi2-core': if build_option('filter_env_vars') and 'LD_LIBRARY_PATH' in build_option('filter_env_vars'): - sed_cmd = 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && ') + sed_cmd = 'sed -i "s/gir_extra_args = \[/gir_extra_args = \[\\n \'--lib-dirs-envvar=FILTER_LD_LIBRARY_PATH\',/g" %(start_dir)s/atspi/meson.build && ' self.cfg.update('preconfigopts', sed_cmd) else: raise EasyBuildError("at-spi2-core-specific hook triggered for non-at-spi2-core easyconfig?!") From 9a1b4c82583d9022fb9a50bff9ce7d2e080cc290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 16 Jan 2024 15:53:57 +0100 Subject: [PATCH 5/5] add link to github issue --- eb_hooks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index a9169d60b8..b3cbc4b28e 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -339,7 +339,8 @@ def pre_configure_hook_atspi2core_filter_ld_library_path(self, *args, **kwargs): """ pre-configure hook for at-spi2-core: - instruct GObject-Introspection's g-ir-scanner tool to not set $LD_LIBRARY_PATH - when EasyBuild is configured to filter it + when EasyBuild is configured to filter it, see: + https://github.com/EESSI/software-layer/issues/196 """ if self.name == 'at-spi2-core': if build_option('filter_env_vars') and 'LD_LIBRARY_PATH' in build_option('filter_env_vars'):