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 CMake configopts when iterating (multiple builds) #2885

Closed

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Feb 9, 2023

Partial revert of #2514:
Do not modify cfg['configopts'] but simply read them and pass the combined result to run_cmd.

This fixes an issue with templating while iterating over e.g. multiple Pythons and also avoids keeping values in configopts over multiple iterations/builds.

Fixes #2881

Alternative to #2882

Potential downside: Easyblocks cannot inspect the configopts actually used.

Partial revert of easybuilders#2541:
Do not modify `cfg['configopts']` but simply read them and pass the
combined result to `run_cmd`.

This fixes an issue with templating while iterating over e.g. multiple Pythons
and also avoids keeping values in configopts over multiple iterations/builds.

Fixes easybuilders#2881
@boegel boegel added the bug fix label Feb 15, 2023
@boegel boegel added this to the next release (4.7.1?) milestone Feb 15, 2023
@@ -139,13 +139,20 @@ def build_type(self):
build_type = 'Debug' if self.toolchain.options.get('debug', None) else 'Release'
return build_type

def prepend_config_opts(self, config_opts):
"""Prepends configure options (-Dkey=value) to configopts ignoring those already set"""
def combine_config_opts(self, config_opts_default):
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a good approach to fix #2881, since it removes a method (prepend_config_opts) from a commonly used generic easyblock like CMakeMake.
Although we don't have any easyblocks in the central repository that derive from CMakeMake and call prepend_config_opts, sites could have their own easyblocks that do, so we shouldn't be breaking the API like this.

As mentioned, not updating configopts in place also has other downsides, like easyblocks deriving from CMakeMake not being able to inspect the modified configopts.

@boegel
Copy link
Member

boegel commented Mar 15, 2023

closing, superseded by #2882

@boegel boegel closed this Mar 15, 2023
@Flamefire Flamefire deleted the fix-cmake-configopts2 branch March 15, 2023 17:38
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.

Regression: Broken templating in EasyBuild 4.7.0
2 participants