fix GCC-system without Intel license#3402
fix GCC-system without Intel license#3402Flamefire wants to merge 1 commit intoeasybuilders:developfrom
Conversation
|
@Flamefire It feels a bit backward to make changes to the |
|
Ah this was the other MRO issue I mentioned in the confcall.
I don't see how. The issue is caused by So the trouble here is that inheritance instead of composition is used for code reuse. We would avoid issues like this, if blocks like So no idea besides making sure that any base class in a multi-inheritance scheme doesn't use |
|
closing this in favor of #3559 |
|
Makes sense I guess :-) |
(created using
eb --new-pr)Python MRO causes trouble here due to multi-inheritance:
SystemCompilerinherits fromEB_GCCandEB_ifortEB_ifortinherits fromEB_iccand both fromIntelBaseprepare_stepcalls e.g.EB_GCC.prepare_stepsuper(EB_GCC, self).prepare_step(*args, **kwargs)prepare_stepinIntelBaseprepare_stepinConfigureMakeIntelBase) continues, then fails:This is due to the MRO which here is
(<class 'easybuild.easyblocks.generic.systemcompiler.SystemCompiler'>, <class 'easybuild.easyblocks.generic.bundle.Bundle'>, <class 'easybuild.easyblocks.gcc.EB_GCC'>, <class 'easybuild.easyblocks.generic.configuremake.ConfigureMake'>, <class 'easybuild.easyblocks.ifort.EB_ifort'>, <class 'easybuild.easyblocks.icc.EB_icc'>, <class 'easybuild.easyblocks.generic.intelbase.IntelBase'>, <class 'easybuild.framework.easyblock.EasyBlock'>, <class 'object'>)Only GCC, IntelBase and EasyBlock define a
prepare_stepso going up from GCC the one in IntelBase is called next.If there was one in ConfigureMake that one would be called between GCC and IntelBase.
My solution here is to directly call
ConfigureMake.prepare_stepfrom GCC which ends inEasyBlock.prepare_step.This works for now but will cause the same issue if
ConfigureMake.prepare_stepwith asuper()call is added at some point.It also will be a problem if someone inherits (e.g. transitively) from
GCCand some other class providingprepare_stepand expects both to be called.I can't think of any other easy solution.
Fixes #2815