-
Notifications
You must be signed in to change notification settings - Fork 908
misc BSD related fixes #2110
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
misc BSD related fixes #2110
Conversation
@@ -27,6 +27,9 @@ | |||
#ifdef HAVE_STRING_H | |||
#include <string.h> | |||
#endif | |||
#ifdef HAVE_SYS_STAT_H |
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.
Please bring that downstream to pmix
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.
that was my plan :-)
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.
PR is openpmix/openpmix#154
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.
I have git and recent autotools on OpenBSD-6.0
Checking out the PR branch, I am now able to autogen which I could not before.
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.
Sorry... having trouble w/ the new review GUI.
My comments were incomplete.
After reporting the net/if.h problem I discovered the divert_pop issue and the ethtool.c header issues. All those three seem to be fixed.
I do not know what the pmix change was intended to fix.
I don't have a fortran compiler, and so cannot comment on the quoting of '*' in the fortran configury.
I still cannot actually run anything on OpenBSD-6.0:
|
@PHHargrove what is your Open MPI i am able to build with |
@ggouaillardet my only configure option was |
i found something odd with OpenBSD
though the following program can be used to evidence the issue define(`print_first_and_tenth', `echo $1 $10')
print_first_and_tenth(`one', `two', `three', `for', `five', `six', `seven', `eight', `nine', `ten') bottom line, |
GNU autotools and OpenBSD's m4 don't get along. |
I also see a problem within Finalize, now that I've configured with --disable-dlopen.
|
@rhc54 can you please comment on the following
and then the simple patch below fixes that, can you please double check it ? diff --git a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c b/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c
index 4d19308..cfa0421 100644
--- a/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c
+++ b/opal/mca/pmix/pmix3x/pmix/src/client/pmix_client.c
@@ -506,6 +506,7 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
"pmix:client finalize sync received");
}
+ PMIX_DESTRUCT(&pmix_client_globals.myserver);
if (!pmix_globals.external_evbase) {
#ifdef HAVE_LIBEVENT_GLOBAL_SHUTDOWN
libevent_global_shutdown();
@@ -514,7 +515,6 @@ PMIX_EXPORT pmix_status_t PMIx_Finalize(const pmix_info_t info[], size_t ninfo)
}
pmix_usock_finalize();
- PMIX_DESTRUCT(&pmix_client_globals.myserver);
PMIX_LIST_DESTRUCT(&pmix_client_globals.pending_requests);
if (0 <= pmix_client_globals.myserver.sd) { |
5920ec5
to
eb1b361
Compare
@jsquyres can you please review ?
|
The PMIx change looks good to me - please upstream as well. Thx! |
@rhc54 i made openpmix/openpmix#155 but only for
|
Thanks! I'll take a look at master and see |
autogen.pl
Outdated
verbose "Checking whether m4 supports the gnu extensions\n"; | ||
my $m4 = $ENV{'M4'}; | ||
$m4 = "m4" unless (defined $m4); | ||
my $result = `$m4 -g config/check_m4_gnu_extension.m4`; |
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.
Don't you need to direct stderr to /dev/null
(or better yet, config.log
, or even better yet, use OPAL_LOG_COMMAND
-- see opal_functions.m4
)? Otherwise, if something goes wrong, we'll see spurrious output in configure stdout / you can't see what happened by examining config.log
.
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.
this is autogen.pl
, OPAL
macros cannot be used, and there is no config.log
at this stage.
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.
Wow, I'm a dope -- you're totally right.
autogen.pl
Outdated
$m4 = "m4" unless (defined $m4); | ||
my $result = `$m4 -g config/check_m4_gnu_extension.m4`; | ||
if ($? != 0) { | ||
$result = `$m4 config/check_m4_gnu_extension.m4`; |
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.
I think you need to check the exit status of this command, too (e.g., use OPAL_LOG_COMMAND
here, too).
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.
the rationale here is m4 -g
fails on OSX, so we have to try again m4
if the second command fails, then $result
will not contain the expected value, so we do not really care of the exit code.
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.
My point here was that we should check here if m4
fails, too. The first time you call m4
, you can expect it to fail for the "on the wrong OS" reason. But m4
could fail for some unexpected reason, too. And that m4
failure output may not go to stdout, making troubleshooting quite difficult. So it would be good to check here and fail nicely if m4
fails for an unexpected reason.
autogen.pl
Outdated
\"$result\", expected value is \"ten\", and known unexpected value is \"one0\" | ||
|
||
=================================================================\n"; | ||
my_exit(1); |
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.
I don't know if you really need two different error messages here -- if you care, you could combine them into a single error message (I don't feel strongly; it is just slightly more code to support).
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.
i reworked that part and used a single error message
(and chomp
too ...)
877fa5f
to
5eb6c54
Compare
:bot:mellanox:retest |
2 similar comments
:bot:mellanox:retest |
:bot:mellanox:retest |
autogen.pl
Outdated
if you are running on OpenBSD, you might want to | ||
export M4=gm4 | ||
and run autogen.pl again | ||
=================================================================\n"; |
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.
I suggest this:
I need an m4 that supports GNU extensions; sorry! I am gonna abort.
$cmd
returned \"$result\", but I need it to return \"ten\". If you are
running on OpenBSD (e.g., if the result is \"one0\"), you might want to
export M4=gm4
and try running autogen.pl again.
(word wrap that above paragraph appropriately; it's hard to tell ~72 chars here in the github web UI)
5eb6c54
to
c36e08f
Compare
i made the requested changes |
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.
Please add a Signed-off-by line to this PR's commit.
@ggouaillardet, do you still want to do something with this patch? |
c36e08f
to
13ee126
Compare
@bwbarrett i think this should land into master. |
@bwbarrett Yeah, it looks like this PR is intentionally causing the FreeBSD CI build to fail, because it's not doing what we expect with |
Is there no other solution than to require GNU m4? That's going to be a major pain in the butt to support long term, and I'm not convinced is the right thing. It seems much more friendly to require only the bits the base system provides. I'm pretty strongly against this patch until we show why we need GNU extensions as the only solution. |
FWIW, I see at least a few places where we use
I haven't looked to see if a) we can use less than 10 params in those places, or b) if there's a way non-GNU-m4 implementations accept >=10 parameters. |
The issue is with |
@jsquyres wrote:
With respect to (b) the answer is YES. Here is some related text from the POSIX spec for m4:
More importantly, here is some text from the GNU m4 docs:
The last two sentences of that quote:
Here is the
The complete page for "Shift", with the argn macro appearing at the very end: |
@ggouaillardet Can you take a run at trying |
otherwise autogen.pl fails on OpenBSD 6.0 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
otherwise autogen.pl fails on OpenBSD 6.0 Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
$10 is interpreted as the tenth argument by a M4 GNU extension, and is interpreted as the first argument followed by the '0' character otherwise (a notable example are BSD systems). Since we do not really need more than nine parameters per macro, revamp a bit of configury and make non GNU M4 happy pandas. Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
13ee126
to
8e36638
Compare
i could not get anyway, we do not need more than 9 arguments per macro, so i revamped the code to make all |
@ggouaillardet Of course reducing all macros to no more than 9 args should work too! |
# [eval if should build], | ||
# [eval if should not build]) | ||
# [set to 1 if should build], | ||
# [set to 0 if should not build]) |
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.
This isn't quite right -- the comment implies that there are 10 parameters. Could you clarify?
It might also be worth mentioning in a comment for each of the macros why there are 9 params instead of 10 (because it's a departure from the m4/Open MPI convention of "eval this if true, eval that if false").
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.
Comment is dead wrong, will fix
dnl -*- shell-script -*- | ||
dnl | ||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana | ||
dnl University Research and Technology |
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.
This file looks like it was removed because it is unused. Yay!
But it should probably be a separate commit, just to show that it was removed because it's dead code -- not part of the revamp to go from 10 m4 params to 9 m4 params.
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.
Sure, wil do
@@ -208,7 +205,7 @@ AC_DEFUN([OPAL_CHECK_PACKAGE],[ | |||
[opal_check_package_happy="yes"], | |||
[opal_check_package_happy="no"])], | |||
[opal_check_package_happy="no"], | |||
[$10]) | |||
[]) |
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.
Did you check that in all places that we call OPAL_CHECK_PACKAGE
from that we don't need any extra includes?
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.
Yep, i did check that.
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.
Cool. It is safe to remove the includes
param from OPAL_CHECK_PACKAGE_HEADER()
, then? Or do other places call it that need includes
?
I'm not sure we're going down the right path; give me some time to look at the argn macro before we give up on that path; should be later this week. |
@jsquyres should we close this? |
Given how out-of-date this is and the lack of any movement in six months, let's just drop it. |
Yo @bwbarrett -- your last comment was:
Do you still care about m4 |
No description provided.