easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
106 stars 285 forks source link

use ERROR global from tools.config in clang easyblock #3318

Closed lexming closed 6 months ago

lexming commented 6 months ago

tools.run no longer imports ERROR from tools.config in 5.0.x, so it has to be directly imported from its origin.

Fixes following error on Clang builds:

EasyBuild crashed! Please consider reporting a bug, this should not happen...

Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 788, in <module>
    main_with_hooks()
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 774, in main_with_hooks
    main(args=args, prepared_cfg_data=(init_session_state, eb_go, cfg_settings))
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 730, in main
    hooks, do_build)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 565, in process_eb_args
    exit_on_failure=exit_on_failure)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 173, in build_and_install_software
    raise ec_res['err']
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/main.py", line 134, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/framework/easyblock.py", line 4301, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/framework/easyblock.py", line 4176, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-framework/easybuild/framework/easyblock.py", line 4011, in run_step
    step_method(self)()
  File "/theia/scratch/brussel/101/vsc10122/easybuild/easybuild-easyblocks/easybuild/easyblocks/c/clang.py", line 344, in configure_step
    if (disable_san_tests or self.cfg['skip_sanitizer_tests']) and build_option('strict') != run.ERROR:
AttributeError: module 'easybuild.tools.run' has no attribute 'ERROR'
ocaisa commented 6 months ago

LGTM

lexming commented 6 months ago

Test report by @lexming

Overview of tested easyconfigs (in order)

Build succeeded for 1 out of 1 (1 easyconfigs in total) node306.hydra.os - Linux Rocky Linux 8.9, x86_64, Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz (skylake_avx512), Python 3.6.8 See https://gist.github.com/lexming/5b356a40c48414fce97b686d067c3a9a for a full test report.