From 5b695a4e3a3d87ad0cf3f096291a9b75d6661a2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 13 Nov 2026 16:46:25 +0100 Subject: [PATCH 1/3] disable RCpc on A64FX for mzR extension --- eb_hooks.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/eb_hooks.py b/eb_hooks.py index 1cbcfc47..301b45c9 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -2229,6 +2229,20 @@ def pre_single_extension_isoband(ext, *args, **kwargs): ext.cfg['preinstallopts'] = "sed -i 's/SIGSTKSZ/32768/g' src/testthat/vendor/catch.h && " +def pre_single_extension_mzr(ext, *args, **kwargs): + """ + Pre-extension hook for mzR R package. + Fixes the following error on A64FX for the included Boost 1.76.0: + Error: selected processor does not support `ldapr w0,[x0] + Error: selected processor does not support `ldapr w0,[x20]' + """ + if ext.name == 'mzR' and ext.version == '2.46.0': + # Prevent that BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC is being defined, + # as the RCpc extension is not supported on A64FX + sed_cmd = 'sed -i "s|#define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|// #define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|g" && ' + ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') + + def pre_single_extension_numpy(ext, *args, **kwargs): """ Pre-extension hook for numpy: @@ -2818,6 +2832,7 @@ def post_easyblock_hook(self, *args, **kwargs): PRE_SINGLE_EXTENSION_HOOKS = { 'isoband': pre_single_extension_isoband, + 'mzR': pre_single_extension_mzr, 'numpy': pre_single_extension_numpy, 'orjson': pre_single_extension_orjson, 'testthat': pre_single_extension_testthat, From 4fa5e6390d583cb4878bee82beeee32ca0850c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Fri, 13 Nov 2026 23:08:38 +0100 Subject: [PATCH 2/3] add path to boost file that needs to be patched --- eb_hooks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eb_hooks.py b/eb_hooks.py index 301b45c9..26a7188b 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -2239,7 +2239,7 @@ def pre_single_extension_mzr(ext, *args, **kwargs): if ext.name == 'mzR' and ext.version == '2.46.0': # Prevent that BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC is being defined, # as the RCpc extension is not supported on A64FX - sed_cmd = 'sed -i "s|#define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|// #define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|g" && ' + sed_cmd = 'sed -i "s|#define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|// #define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|g" src/boost/atomic/detail/caps_arch_gcc_aarch64.hpp && ' ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') From 835ee0c78e816dd005ccc011d4b85241ab463abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Sat, 14 Nov 2026 23:08:56 +0100 Subject: [PATCH 3/3] only apply mzR hook for A64FX --- eb_hooks.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/eb_hooks.py b/eb_hooks.py index 26a7188b..f8de44b5 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -2236,11 +2236,13 @@ def pre_single_extension_mzr(ext, *args, **kwargs): Error: selected processor does not support `ldapr w0,[x0] Error: selected processor does not support `ldapr w0,[x20]' """ + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') if ext.name == 'mzR' and ext.version == '2.46.0': - # Prevent that BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC is being defined, - # as the RCpc extension is not supported on A64FX - sed_cmd = 'sed -i "s|#define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|// #define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|g" src/boost/atomic/detail/caps_arch_gcc_aarch64.hpp && ' - ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') + if cpu_target == CPU_TARGET_A64FX: + # Prevent that BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC is being defined, + # as the RCpc extension is not supported on A64FX + sed_cmd = 'sed -i "s|#define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|// #define BOOST_ATOMIC_DETAIL_AARCH64_HAS_RCPC|g" src/boost/atomic/detail/caps_arch_gcc_aarch64.hpp && ' + ext.cfg['preinstallopts'] = sed_cmd + ext.cfg.get('preinstallopts', '') def pre_single_extension_numpy(ext, *args, **kwargs):