diff --git a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.2-2023b.yml b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.2-2023b.yml index 2e98a71341..d4df04dcaa 100644 --- a/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.2-2023b.yml +++ b/easystacks/pilot.nessi.no/2023.06/eessi-2023.06-eb-4.9.2-2023b.yml @@ -4,3 +4,9 @@ easyconfigs: options: # see https://github.com/easybuilders/easybuild-easyconfigs/pull/20889 from-commit: c66c4788a17f7e4f55aa23f9fdb782aad97c9ce7 + - Extrae-4.2.0-gompi-2023b.eb: + options: + # see https://github.com/easybuilders/easybuild-easyconfigs/pull/21017 + from-commit: 120f4d56efebd2bc61382db4c84a664a339c66cf + # see https://github.com/easybuilders/easybuild-easyblocks/pull/3393 + include-easyblocks-from-commit: c4951c78d62fa5cf8e9f6fe0ead212d2a4d7cb9c diff --git a/eb_hooks.py b/eb_hooks.py index 13670a4a4d..4c6eb103b9 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -1,5 +1,6 @@ # Hooks to customize how EasyBuild installs software in EESSI # see https://docs.easybuild.io/en/latest/Hooks.html +import glob import os import re @@ -466,6 +467,36 @@ def pre_configure_hook_gobject_introspection(self, *args, **kwargs): raise EasyBuildError("GObject-Introspection-specific hook triggered for non-GObject-Introspection easyconfig?!") +def pre_configure_hook_extrae(self, *args, **kwargs): + """ + Pre-configure hook for Extrae + - avoid use of 'which' in configure script + - specify correct path to binutils/zlib (in compat layer) + """ + if self.name == 'Extrae': + + # determine path to Prefix installation in compat layer via $EPREFIX + eprefix = get_eessi_envvar('EPREFIX') + + binutils_lib_path_glob_pattern = os.path.join(eprefix, 'usr', 'lib*', 'binutils', '*-linux-gnu', '2.*') + binutils_lib_path = glob.glob(binutils_lib_path_glob_pattern) + if len(binutils_lib_path) == 1: + self.cfg.update('configopts', '--with-binutils=' + binutils_lib_path[0]) + else: + raise EasyBuildError("Failed to isolate path for binutils libraries using %s, got %s", + binutils_lib_path_glob_pattern, binutils_lib_path) + + # zlib is a filtered dependency, so we need to manually specify it's location to avoid the host version + self.cfg.update('configopts', '--with-libz=' + eprefix) + + # replace use of 'which' with 'command -v', since 'which' is broken in EESSI build container; + # this must be done *after* running configure script, because initial configuration re-writes configure script, + # and problem due to use of which only pops up when running make ?! + self.cfg.update('prebuildopts', "cp config/mpi-macros.m4 config/mpi-macros.m4.orig && sed -i 's/`which /`command -v /g' config/mpi-macros.m4 && ") + else: + raise EasyBuildError("Extrae-specific hook triggered for non-Extrae easyconfig?!") + + def pre_configure_hook_gromacs(self, *args, **kwargs): """ Pre-configure hook for GROMACS: @@ -969,6 +1000,7 @@ def pre_module_hook_librosa_augment_modluafooter(self, *args, **kwargs): } PRE_CONFIGURE_HOOKS = { + 'Extrae': pre_configure_hook_extrae, 'GObject-Introspection': pre_configure_hook_gobject_introspection, 'GROMACS': pre_configure_hook_gromacs, 'libfabric': pre_configure_hook_libfabric_disable_psm3_x86_64_generic,