Skip to content
20 changes: 19 additions & 1 deletion eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def is_gcccore_1220_based(**kwargs):
)



def get_cuda_version(ec, check_deps=True, check_builddeps=True):
"""
Returns the CUDA version that this EasyConfig (ec) uses as a (build)dependency.
Expand Down Expand Up @@ -632,6 +631,24 @@ def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix):
raise EasyBuildError("Qt5-specific hook triggered for non-Qt5 easyconfig?!")


def parse_hook_maturin(ec, eprefix):
"""
Replace build dependency on Rust 1.88.0 by 1.91.1,
as 1.88.0 causes segmentation faults on A64FX.
cfr. https://github.com/EESSI/software-layer/pull/1357
"""
if ec.name == 'maturin':
if ec.version == '1.9.1':
orig_rust = ('Rust', '1.88.0')
new_rust = ('Rust', '1.91.1')
if orig_rust in ec['builddependencies']:
rust_index = ec['builddependencies'].index(orig_rust)
ec['builddependencies'][rust_index] = new_rust
print_msg(f"Replaced {orig_rust} build dependency by {new_rust} for {ec.name} {ec.version}")
else:
raise EasyBuildError("maturin-specific hook triggered for non-maturin easyconfig?!")


def parse_hook_ucx_eprefix(ec, eprefix):
"""Make UCX aware of compatibility layer via additional configuration options."""
if ec.name == 'UCX':
Expand Down Expand Up @@ -1818,6 +1835,7 @@ def post_easyblock_hook(self, *args, **kwargs):
'fontconfig': parse_hook_fontconfig_add_fonts,
'FreeImage': parse_hook_freeimage_aarch64,
'grpcio': parse_hook_grpcio_zlib,
'maturin': parse_hook_maturin,
'Mesa': parse_hook_mesa_use_llvm_minimal,
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'pybind11': parse_hook_pybind11_replace_catch2,
Expand Down
Loading