Skip to content
Open
Changes from all 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
24 changes: 24 additions & 0 deletions eb_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,29 @@ def parse_hook_qt5_check_qtwebengine_disable(ec, eprefix):
raise EasyBuildError("Qt5-specific hook triggered for non-Qt5 easyconfig?!")


def parse_hook_qt6_libinput(ec, eprefix):
"""
Add dependency on libinput to Qt6.
This is not included in upstream EasyBuild as it brings a dependency on system-d
"""
qt6_toolchain_version_to_libinput_version_map = {'14.3.0': '1.30.1'}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can trigger the error path by changing the GCCcore version, this gives:

{EESSI/2025.06} ocaisa@~/EESSI/software-layer-scripts(qt6_libinput)$ eb --from-pr 25901 -D --robot --hooks=./eb_hooks.py
== Temporary log file in case of crash /tmp/eb-v9bnr8n2/easybuild-1eov9jef.log
== found valid index for /cvmfs/software.eessi.io/versions/2025.06/software/linux/aarch64/neoverse_n1/software/EasyBuild/5.3.0/easybuild/easyconfigs, so using it...
== Running parse hook for Qt6-6.9.3-GCCcore-14.3.0.eb...
== found valid index for /cvmfs/software.eessi.io/versions/2025.06/software/linux/aarch64/neoverse_n1/software/EasyBuild/5.3.0/easybuild/easyconfigs, so using it...
== Running parse hook for GCCcore-14.3.0.eb...


ERROR: Failed to process easyconfig /tmp/eb-v9bnr8n2/files_pr25901/q/Qt6/Qt6-6.9.3-GCCcore-14.3.0.eb: No libinput dependency found for Qt6 6.9.3, please update relevant Qt6 hook

if ec.name == 'Qt6':
# Only enforcing from GCCcore 14.3.0 onwards for Qt6 6.9.3 onwards
if ec.toolchain.version >= LooseVersion('14.3.0'):
if ec.version >= LooseVersion('6.9.3'):
dep_names = [dep[0] for dep in ec['dependencies']]
if 'libinput' not in dep_names:
if ec.toolchain.version in qt6_toolchain_version_to_libinput_version_map.keys():
libinput = ('libinput', qt6_toolchain_version_to_libinput_version_map[ec.toolchain.version])
ec['dependencies'].append(libinput)
print_msg(f"Added {libinput} dependency for {ec.name} {ec.version}")
else:
raise EasyBuildError(
f"No libinput dependency found for {ec.name} {ec.version}, please update relevant Qt6 hook"
)
else:
raise EasyBuildError("maturin-specific hook triggered for non-maturin easyconfig?!")

def parse_hook_maturin(ec, eprefix):
"""
Replace build dependency on Rust 1.88.0 by 1.91.1,
Expand Down Expand Up @@ -2010,6 +2033,7 @@ def post_easyblock_hook(self, *args, **kwargs):
'OpenBLAS': parse_hook_openblas_relax_lapack_tests_num_errors,
'pybind11': parse_hook_pybind11_replace_catch2,
'Qt5': parse_hook_qt5_check_qtwebengine_disable,
'Qt6': parse_hook_qt6_libinput,
'UCX': parse_hook_ucx_eprefix,
}

Expand Down
Loading