Thanks Paul. Actually, all .c files are required to include pmix_config.h at the very beginning of the file, before anything else. Sounds like some files are missing it, so we’ll have to go back and fix those.
> On Mar 6, 2017, at 2:35 PM, Paul Hargrove <phhargr...@lbl.gov> wrote: > > Ralph, > > I found a couple issues with PMIX in the 2.2.0rc2 tarball. > However, I am providing a proper fix for one and a sub-standard fix for the > other. > > The following short patch resolves the build errors with "unknown type name > 'pid_t'" on (so far at least) FreeBSD when compiling > opal/mca/pmix/pmix112/pmix/src/sm/pmix_sm.c > > --- opal/mca/pmix/pmix112/pmix/include/pmix/pmix_common.h~ 2017-03-06 > 13:58:18.625897000 -0800 > +++ opal/mca/pmix/pmix112/pmix/include/pmix/pmix_common.h 2017-03-06 > 13:58:24.392739000 -0800 > @@ -50,6 +50,9 @@ > #include <stdlib.h> > #include <stdint.h> > #include <string.h> > +#ifdef HAVE_UNISTD_H > +#include <unistd.h> /* for pid_t */ > +#endif > #ifdef HAVE_SYS_TIME_H > #include <sys/time.h> /* for struct timeval */ > #endif > Signed-off-by: Paul H. Hargrove <phhargr...@lbl.gov > <mailto:phhargr...@lbl.gov>> > > The second issue is an incomplete definition for "struct timeval" on FreeBSD > and NetBSD (maybe others). > In pmix_common.h I see: > #ifdef HAVE_SYS_TIME_H > #include <sys/time.h> /* for struct timeval */ > #endif > However, since at least one source file is including pmix_common.h *before* > pmix_config.h, HAVE_SYS_TIME_H is not getting defined. > > The following was sufficient for the *one* file I saw failing to compiler. > However, I seriously doubt this is the right way (or place) to fix this (and > am correspondingly omitting a sign-off). > --- opal/mca/pmix/pmix112/pmix/src/sm/pmix_sm.c~ 2017-03-06 > 14:03:42.000000000 -0800 > +++ opal/mca/pmix/pmix112/pmix/src/sm/pmix_sm.c 2017-03-06 14:13:22.000000000 > -0800 > @@ -8,6 +8,7 @@ > * $HEADER$ > */ > > +#include "src/include/pmix_config.h" > #include <pmix/pmix_common.h> > #include "src/include/pmix_globals.h" > #include "pmix_sm.h" > > Unfortunately, on NetBSD that just gets me past compilation to fail at > runtime - the subject of my next email. > > -Paul > > -- > Paul H. Hargrove phhargr...@lbl.gov > <mailto:phhargr...@lbl.gov> > Computer Languages & Systems Software (CLaSS) Group > Computer Science Department Tel: +1-510-495-2352 > Lawrence Berkeley National Laboratory Fax: +1-510-486-6900 > _______________________________________________ > devel mailing list > devel@lists.open-mpi.org > https://rfd.newmexicoconsortium.org/mailman/listinfo/devel
_______________________________________________ devel mailing list devel@lists.open-mpi.org https://rfd.newmexicoconsortium.org/mailman/listinfo/devel