-
Notifications
You must be signed in to change notification settings - Fork 923
opal_check_package: filter /usr[/local]/include from CPPFLAGS #4722
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
Conversation
…with-package=DIR Signed-off-by: Philip Kovacs <pkdevel@yahoo.com>
Can one of the admins verify this patch? |
ok to test |
let's say generally speaking, Open MPI gives the enduser what they ask for, so if an end user decides to if Generally speaking, bottom line, i am not sure @alex-mikheev and @pkovacs are discussing the same issue. |
@ggouaillardet In your example the code operates correctly. The supplied prefix is not one of these four ( |
are you talking of the first example ? |
I was originally trying to address the issue that If there is a requirement that multiple installations of the same package, one in a standard location and another in a non-standard location be supported, well, I don't know what to say to that. Multiple installations should be installed with careful separation to avoid stuff like AC_CHECK_HEADERS finding the wrong one. e.g. This issue is small and uninteresting -- is something broken now that wasn't broken before? |
That's what i have to say : we have to support the (not so uncommon imho) case when package @jsquyres @rhc54 if you disagree, please comment so we can end this conversation right away. In order to use the alternate package, an end user used to If i read correctly, now, Regardless how small and/or uninteresting it can be perceived, that qualifies as something broken now that wasn't broken before In order to address the initial issue, i'd rather have
|
I think we are confusing two distinct questions that were addressed by two separate PRs. First, we discussed and agreed on the first PR that when Second, this PR addressed the problem of the user specifying a standard location for DIR. We have always avoided adding standard locations to the CPPFLAGS and friends as otherwise we can inadvertently pick up incorrect installations of other packages (e.g., hwloc and libevent). The issue that was raised was that we already excluded /usr and /usr/local, but failed to exclude /usr/include and /usr/local/include - which are also standard locations. All this PR did was add those exclusions. It won't in any way interfere with the If I understand the originally expressed concern, @ggouaillardet was raising the question of executing AC_CHECK_HEADERS with CPPFLAGS not being set strictly to -IDIR - i.e., the standard locations remaining in CPPFLAGS. I concur - we need to change that to I fear that concern got lost in the confusion. It would seem a rather trivial change, but should better have been raised against the first PR (and not this one). |
@rhc54 i do not think you can tell the preprocessor (and hence nor the compiler nor |
Well then, the user is hosed - I see no way to resolve that problem. |
strictly speaking, i concur, there is not a 100% bulletproof solution. pragmatically speaking, i still think the approach i suggested previously is better and good enough
this is not ideal, for example
imho, these are two corner cases that are unlikely to be met in the real world, so i would not bother too much. also, this is still less intrusive than adding a on the bright side, we should be a bit faster since i expect most headers will be in by the way, the initial issue was there was no way to search for pmix headers in |
I confess - you have successfully made my head really hurt and totally confused me We had a discussion about this before, and opted to go the direction that was implemented. You appear to be suggesting we go back again? It feels like we keep revisiting these issues ad nauseum, so I'm going to give up at this point - if @jsquyres feels like continuing this debate, I'll defer to him. Just for @pkovacs sake - this entire discussion has absolutely nothing to do with this PR. It has to do with the prior one we committed last week. |
well, go back again would mean we only test for the records, this PR started as a fix of the one we committed last week per the report from @alex-mikheev . i have no issue with this PR itself, but i do not think it fixes the reported issue. |
As @ggouaillardet says this PR does not fix my original issue. His #4722 (comment) describes the problem very well. I run into the same problem when trying to build ompi with my private UCX library while having it also installed with /usr prefix. What about testing if .h file actually exists in $dir_prefix and $dir_prefix/include before invoking AC_CHECK_HEADERS ? That way we can be reasonably sure that compiler will not pick the header file from a default location. |
You guys are the owners and of course I defer to your final decision here. If you're trying to manage overlapping development library installations, one in a standard and one in non-standard location, I have to shake my gray hairs, however, and say: "You're doing it wrong." Suppose for example, one program correctly compiles and links the non-standard library and it works properly. Great. Now suppose some other program on the same system uses |
@pkovacs I might agree with you, except that every HPC system I've ever seen and most Linux systems at any corporate office I've ever seen are doing exactly that. There's a base library (libhwloc, for example) installed with your distro, which is ancient (because you're still running CentOS 6) and you need a recent version for anything to compile, so you just build it yourself. I agree it's insane, but it's also reality and at some point, I got too old to fight reality. @alex-mikheev I thought we used to do that and stopped for some reason. It's probably worth a dive into the CHECK_PACKAGE commit history to make sure there isn't a comment about why. I could, of course be totally wrong there. Barring some lesson learned, that seems like a good idea. Even just checking if the directory exists would probably weed out the really common cases. |
The point that @pkovacs made is still correct, however - the fact that the directory and header file exist somewhere has no bearing on whether or not you got the corresponding library. So as was pointed out somewhere in this mess, you may well wind up with a mismatched header and library - which is why we went to check_package in place of just checking for header file existence in the prior commit. |
Let's take a step back. I believe I am at fault here. Both this PR and #4683 stem from an incorrect comment that I made on #4683 (specifically: #4683 (comment)). I then got too busy and didn't notice where #4683 went until this morning. Sorry folks. 😢 Here's the situation:
should find headers in
I wonder if our current scheme is simply too complex, and the PMIX situation simply exposed a weakness that the current scheme is ill-equipped to handle without adding even more complexity. Perhaps we should move towards a simplification of our current scheme. Here's a proposal:
This does add new CLI options -- which is something we tried not to do a long time ago -- but I think we're in a complex-enough scenario these days that giving the override / "do exactly this" options is now the Right Thing to do when our If we all agree, @bwbarrett has graciously volunteered to implement |
👎 I honestly don't think what you propose is going to help the problem @pkovacs and I were trying to solve. However, I also don't have time to continue the debate. I will revert the two commits tonight (have to run now), and would advise that you not make the proposed changes as it only further confuses things (though it is up to you as it is your code). Instead, once the reverts are complete, @pkovacs and I will implement a custom configure for external pmix instead of using check_package. This should let us resolve our problems independent of impacting everyone else and avoid the circular argument. |
+1 for reverting both commits Then the problem @pkovacs and you are (will be ?) facing can be solved by
It seems that in a kind of collective hallucination, we all jumped to the conclusion if @jsquyres proposal is implemented, then
will solve the issue in a (imho) more elegant manner. As far as i am concerned, we faced only one similar case and we handled it accordingly. I am not aware PMIx has any plans to install its headers in |
Thank you for the input - we will do what is required so it only impacts PMIx...and get out of circular debates 😄 |
Using
|
Understood. Let's take this into a new PR that just works within the OPAL_CHECK_PMIX macro so we avoid having to worry about impacting anyone else. Would you like to create a new PR we can collaborate on? Or shall I create it? |
i will likely open a PR shortly (based on the initial PR) |
Please don't take offense, but it might be best if @pkovacs and I took this from here as the problem was first surfaced via the packagers and we are somewhat more familiar with the issues. This debate wound up being centered on only one of the issues, and probably the least important one. |
The new approach outlined by @jsquyres in #4722 (comment) above is actually pretty darn good. It solves the problem generally. If a new The problem exists really for any of the dependent packages. I want to be able to install them anywhere and find them anywhere. |
@ggouaillardet @bwbarrett I was talking about this issue with @rhc54 today -- the issue is still unresolved, even though this PR is closed (without merging). I think we actually did come to more-or-less consensus on a new proposal for |
@jsquyres i will take a crack at it ! |
Thanks @ggouaillardet! |
When using
./configure --with-package=/usr/include
or--with-package=/usr/local/include
we do not want those directories to appear in the CPPFLAGS since they are standard system directories.Signed-off-by: Philip Kovacs pkdevel@yahoo.com