-
Couldn't load subscription status.
- Fork 928
Improving robustness in opal_check_package header checking. #721
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
Improving robustness in opal_check_package header checking. #721
Conversation
|
@avilcheslopez looks like this broke the hcoll m4 - not sure why, but I wonder if we lost one of the optional sub-directories with the change? |
|
@rhc54: :o! Will look into this... |
different fix to address this issue.
|
@rhc54: I made some changes and the issue has been resolved now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the fourth argument to AC_CHECK_HEADERS makes this line disagree with the AC_VERBOSE message immediately above, and is certainly wrong if CPPFLAGS is not modified. I don't think this part of the change is good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see. Sure, I can fix this.
|
@avilcheslopez would you explain a bit about why you wanted this change? The initial comment in the PR doesn't explain the failure case you were hitting. I.e., what were you building with which arguments that was causing a problem? That information should be present in both the PR and the commit message, otherwise this change appears to be gratuitous. The primary user of this macro is The addition of a third stanza of Also, the two commits here should be squashed together before this PR is pulled (assuming we do end up actually pulling it). |
|
I agree with @goodell -- can you cite the failure you're trying to fix? It would be unusual for someone to specify |
|
@jsquyres, @goodell: actually, yes, that is exactly the issue we're having: one of our components depends on a package that installs the headers in a funny path while the libraries are installed in the standard path. So we thought making the _OPAL_CHECK_PACKAGE_HEADER macro more robust to check in besides /include would be helpful. If you find this solution acceptable, I can definitely go ahead and squash the commits and improve the commit message as you suggested. However, if there is a better approach to dealing with this, I'm definitely open to that as well. |
|
What package is doing this funny installation? Can that package be fixed? It would certainly be more social to have a dependent package install itself like the rest of the world does rather than force us to put in weird workarounds. :-) |
|
It's postgres :o. So unfortunately, it can't be fixed. However, it's not entirely inconsistent with standard practices, it's just inconsistent across distributions and versions. This is the funny behavior:
Perhaps there already is a method for handling these situations and I haven't looked into it. |
|
@avilcheslopez Ew -- it has multiple different #include paths? Bad Postgres! Bad, bad Postgres! I think what you want to do is check into what happens when you
Or is that answer different on different distros? It is significantly easier if the answer is the same on all distros (which would likely be option number 1). Because then your code should include PG header files the same way that they do -- i.e., in your component .c files, follow exactly the same convention that they do for including header files, and then just have a You can figure which If each distro changes the convention of how you include Postgres header files, then a) the Postgres authors and packagers should be flogged, and b) what we need to do here in OMPI gets significantly more complex. Let's hope that's not the case. |
|
@jsquyres: I looked at the Postgres header files, and they include other Postgres header files like this: Ideally, I would like to simply do one of the following: Now, I could add some extra logic in my component's configure.m4 to figure out what's going on and based on that pass the appropriate parameters to OPAL_CHECK_PACKAGE. For example, in the case of the headers being installed in I agree that changing OPAL_CHECK_PACKAGE to accommodate for this issue is not the correct solution (especially since we're abusing the meaning of "directory prefix"). I considered this patch simply because regardless of all these issues, it seemed to add some robustness to the macro (i.e. it's not really "tailored" to our particular issue with postgres, but it enables our "workaround"). I don't know if we could maybe pass another flag besides I don't know... Any ideas? I'm okay with adding more logic to my component's configure.m4 file. |
|
I'm leaning towards you just fixing this up in your component's Another option is that we could update the |
|
Yeah, I like the idea of the additional "--with" options. In the meantime, I'll close this request and work on a fix within our configure.m4 file. |
…ke-ibv-provider-to-its-own-common-component v2.0.0: common_usnic: move fake IBV provider to libopen-pal
This is to make the header checking in the opal_check_package macro a little bit more robust (specifically in "_OPAL_CHECK_PACKAGE_HEADER"). Basically, in addition to looking in /include, it also tries looking in the provided path directly.