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

openmpi.spec: fix configure external 3rd-party package conflict #12542

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wenduwan
Copy link
Contributor

When the user provides both --with-<package>=/path/to/local/install and all_external_3rd_party=1(which is the default value), the latter overrides --with-<package>=external. In this case the former explicitly provided options should be followed instead.

@@ -495,7 +495,7 @@ CXXFLAGS="%{?cxxflags:%{cxxflags}}%{!?cxxflags:$RPM_OPT_FLAGS}"
FCFLAGS="%{?fcflags:%{fcflags}}%{!?fcflags:$RPM_OPT_FLAGS}"
export CFLAGS CXXFLAGS FCFLAGS

%configure %{configure_options} %{_configure_3rd_party}
Copy link
Member

Choose a reason for hiding this comment

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

This seems like the wrong fix. All you've done is make the configure line ./configure --with-<foo>=external --with-<foo>=<path> and assume that configure will take the last option. That's likely to always be true, but a better option seems to be handling this way earlier in the process, by being selective about how the --with-<foo>=external flags are added.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In the update we inspect user provided configure_options and only set --with-<pkg>=external if:

  • all_external_3rd_party is true
  • user did not specify --with-<pkg>=<path> at all

I was looking for a better place to put this logic but landed here right before configure ..., since that is the only consumer of those options.

@wenduwan wenduwan force-pushed the fix_spec_3rd_party_configure branch from 91df683 to b4042fb Compare May 14, 2024 00:27
When the user provides both `--with-<package>=/path/to/local/install` and
all_external_3rd_party=1(which is the default value), the latter overrides
`--with-<package>=external`. In this case the former explicitly provided
options should be followed instead.

Signed-off-by: Wenduo Wang <wenduwan@amazon.com>
@wenduwan wenduwan force-pushed the fix_spec_3rd_party_configure branch from b4042fb to fb78c22 Compare May 14, 2024 00:33
@jsquyres
Copy link
Member

If we detect --with-<package>=blah and all_external_3rd_party=1, why don't we just abort? We've been given conflicting requirements, after all -- it seems like there will not be a correct answer for all situations. Let the human figure it out, and re-run with non-conflicting options.

@wenduwan
Copy link
Contributor Author

@jsquyres That should also work. Right now all_external_3rd_party=1 is the default, so in the suggested approach the user has to set all_external_3rd_party=0 to override --with-pmix=/path/to/local/install - I wonder what should the spec file set for the others, e.g. --with-prrte, etc. I think the most sensible decision in this case would be:

  • If the user set all_external_3rd_party=1 then all of the packages will be --with-<pkg>=external. The user should not set any of the --with-<pkg>.
  • If the user set all_external_3rd_party=0 then all of the packages MUST be set explicitly.

In other words it would be all-or-nothing. I'm not sure how much churn this will cause for the packagers in the field using the current spec file, but at least now we don't have the ambiguity anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants