Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix failing sanity check for GCCcore 5.x + sanity check under --module-only for all GCCcore versions #2059

Merged

Conversation

boegel
Copy link
Member

@boegel boegel commented May 17, 2020

The changes in #2033 broken the sanity check for GCCcore-5.3.0.eb, GCCcore-5.4.0.eb, GCCcore-5.5.0.eb (while older versions like GCCcore-4.9.3.eb and newer versions are still fine):

== sanity checking...                                                                                                                                                                                         ...
  >> file 'libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto1' or 'lib/gcc/x86_64-pc-linux-gnu/5.4.0/lto1' found: FAILED
  >> file 'libexec/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper' or 'lib/gcc/x86_64-pc-linux-gnu/5.4.0/lto-wrapper' found: FAILED
  >> file 'libexec/gcc/x86_64-pc-linux-gnu/5.4.0/liblto_plugin.so' or 'lib/gcc/x86_64-pc-linux-gnu/5.4.0/liblto_plugin.so' found: FAILED
...
  >> (non-empty) directory 'lib/gcc/x86_64-pc-linux-gnu/5.4.0' found: FAILED                                                                                                                                 

The issue is that even though the updated config.guess suggests that the x86_64-pc-linux-gnu should be used, the GCCcore installation still has x86_64-unknown-linux-gnu.

In addition, it made the problem with --module-only worse, since rather than just having a failing sanity check (see #1588), the GCC easyblock now produces a hard crash because self.platform_lib is never defined when using --module-only:

$ eb GCCcore-5.4.0.eb --module-only
== sanity checking...
ERROR: Traceback (most recent call last):
  File "/lib/python2.7/site-packages/easybuild_framework-4.2.1.dev0-py2.7.egg/easybuild/main.py", line 114, in build_and_install_software
    (ec_res['success'], app_log, err) = build_and_install_one(ec, init_env)
  File "/lib/python2.7/site-packages/easybuild_framework-4.2.1.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 3234, in build_and_install_one
    result = app.run_all_steps(run_test_cases=run_test_cases)
  File "/lib/python2.7/site-packages/easybuild_framework-4.2.1.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 3139, in run_all_steps
    self.run_step(step_name, step_methods)
  File "/lib/python2.7/site-packages/easybuild_framework-4.2.1.dev0-py2.7.egg/easybuild/framework/easyblock.py", line 2994, in run_step
    step_method(self)()
  File "/lib/python2.7/site-packages/easybuild_easyblocks-4.2.1.dev0-py2.7.egg/easybuild/easyblocks/g/gcc.py", line 635, in sanity_check_step
    common_infix = os.path.join('gcc', self.platform_lib, self.version)
AttributeError: 'EB_GCC' object has no attribute 'platform_lib'

I've fixed both issues by slightly loosening up the sanity check in the GCC easyblock w.r.t. the "configuration name" subdirectory, which was already the proposed solution in #1588 .

We don't really care what this directory is called, just that it's there.

This allows us to drop the use of self.platform_lib entirely.

The updated config.guess (result of the changes in #2033) is still used by the GCC build process internally, so that's basically left untouched (we just don't use config.guess ourselves anymore now).

fixes #1588

@boegel boegel added the bug fix label May 17, 2020
@boegel boegel added this to the next release (4.2.1?) milestone May 17, 2020
@boegel
Copy link
Member Author

boegel commented May 17, 2020

This makes eb --module-only works for all 22 GCCcore easyconfigs we have.

Copy link
Member

@verdurin verdurin left a comment

Choose a reason for hiding this comment

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

Looks fine. Tested by demonstrating it would re-instate an old GCCcore module.

@verdurin
Copy link
Member

Going in, thanks @boegel!

@verdurin verdurin merged commit 386947e into easybuilders:develop May 17, 2020
@boegel boegel deleted the fix_GCC5_sanity_check_module_only branch May 17, 2020 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GCCcore sanity check fails under --module-only
2 participants