building 2.0.0rc1 on cygwin I was stacked on opal/mca/pmix/pmix1xx/pmix
Question: - as pmix depends on hwloc and libevents, is it supposed to link against opal shared lib, is it supposed to be included in the opal shared lib or is it a circular dependency ? I solved the build changing from shared to convenience library. -lib_LTLIBRARIES = libpmix.la +noinst_LTLIBRARIES = libpmix.la as circular dependency will be a hell to manage with the no-undefined flag. The attached patch solves also - several lacks of declaration for opal_output functions used in the ompi tree. They also require libmpi link vs lib@opal_lib_pre...@open-pal.la - lack of declaration for several <unistd.h> functions like access, gethostname, usleep, .. - add !defined(__CYGWIN__) on libevent2022/libevent/event.h as for current 1.8 and 1.10 code. Please also note that usleep is marked as obsolescent on Open Group Base Specifications Issue 6 http://pubs.opengroup.org/onlinepubs/009695399/functions/usleep.html and it is missing on Issue7 With this patch it builds on cygwin 64 bit and passes the same tests of 1.10.x code Regards Marco
--- origsrc/openmpi-2.0.0rc1/ompi/Makefile.am 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/ompi/Makefile.am 2015-12-23 06:49:07.003451100 +0100 @@ -130,6 +130,7 @@ DIST_SUBDIRS = \ lib_LTLIBRARIES = libmpi.la libmpi_la_SOURCES = libmpi_la_LIBADD = \ + $(OMPI_TOP_BUILDDIR)/opal/lib@opal_lib_pre...@open-pal.la \ datatype/libdatatype.la \ debuggers/libdebuggers.la \ mpi/c/libmpi_c.la \ --- origsrc/openmpi-2.0.0rc1/ompi/mca/coll/tuned/coll_tuned.h 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/ompi/mca/coll/tuned/coll_tuned.h 2015-12-23 06:49:07.013451100 +0100 @@ -21,6 +21,7 @@ #include "ompi/mca/mca.h" #include "ompi/request/request.h" #include "ompi/mca/coll/base/coll_base_functions.h" +#include "opal/util/output.h" /* also need the dynamic rule structures */ #include "coll_tuned_dynamic_rules.h" --- origsrc/openmpi-2.0.0rc1/ompi/mca/fbtl/base/fbtl_base_find_available.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/ompi/mca/fbtl/base/fbtl_base_find_available.c 2015-12-23 10:13:01.353793800 +0100 @@ -25,6 +25,7 @@ #include "mpi.h" #include "ompi/constants.h" #include "opal/class/opal_list.h" +#include "opal/util/output.h" #include "ompi/mca/mca.h" #include "opal/mca/base/base.h" #include "ompi/mca/fbtl/fbtl.h" --- origsrc/openmpi-2.0.0rc1/opal/mca/base/base.h 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/base/base.h 2015-12-23 09:54:43.169182900 +0100 @@ -35,6 +35,7 @@ #include "opal/mca/base/mca_base_var.h" #include "opal/mca/base/mca_base_framework.h" #include "opal/util/cmd_line.h" +#include "opal/util/output.h" BEGIN_C_DECLS --- origsrc/openmpi-2.0.0rc1/opal/mca/base/mca_base_component_repository.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/base/mca_base_component_repository.c 2015-12-23 09:58:25.202502900 +0100 @@ -30,6 +30,7 @@ #include <string.h> #include <stdlib.h> #include <stdio.h> +#include <unistd.h> #include "opal/class/opal_list.h" #include "opal/mca/mca.h" --- origsrc/openmpi-2.0.0rc1/opal/mca/btl/sm/btl_sm.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/btl/sm/btl_sm.c 2015-12-23 06:49:07.033451100 +0100 @@ -30,6 +30,7 @@ #include <sys/types.h> #include <sys/stat.h> +#include <unistd.h> #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif /* HAVE_FCNTL_H */ --- origsrc/openmpi-2.0.0rc1/opal/mca/btl/tcp/btl_tcp.h 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/btl/tcp/btl_tcp.h 2015-12-23 10:09:42.226504600 +0100 @@ -37,6 +37,7 @@ #ifdef HAVE_NETINET_IN_H #include <netinet/in.h> #endif +#include <unistd.h> /* Open MPI includes */ #include "opal/mca/event/event.h" --- origsrc/openmpi-2.0.0rc1/opal/mca/event/libevent2022/libevent/event.h 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/event/libevent2022/libevent/event.h 2015-12-23 06:49:07.053451200 +0100 @@ -56,7 +56,7 @@ extern "C" { /* For int types. */ #include <evutil.h> -#ifdef WIN32 +#if defined(WIN32) && !defined(__CYGWIN__) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif --- origsrc/openmpi-2.0.0rc1/opal/mca/mpool/base/mpool_base_tree.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/mpool/base/mpool_base_tree.c 2015-12-23 10:00:28.592679000 +0100 @@ -28,6 +28,7 @@ * Description of the Registration Cache framework */ +#include <unistd.h> #include "opal_config.h" #include "opal/mca/mca.h" --- origsrc/openmpi-2.0.0rc1/opal/mca/pmix/base/pmix_base_fns.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/pmix/base/pmix_base_fns.c 2015-12-23 10:05:17.804124200 +0100 @@ -21,6 +21,7 @@ #include <time.h> #include <string.h> +#include <unistd.h> #include "opal_stdint.h" #include "opal/class/opal_pointer_array.h" --- origsrc/openmpi-2.0.0rc1/opal/mca/pmix/pmix1xx/pmix/Makefile.am 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/pmix/pmix1xx/pmix/Makefile.am 2015-12-23 06:49:07.063451200 +0100 @@ -50,10 +50,10 @@ include src/client/Makefile.am include src/server/Makefile.am include src/sec/Makefile.am -lib_LTLIBRARIES = libpmix.la +noinst_LTLIBRARIES = libpmix.la libpmix_la_SOURCES = $(headers) $(sources) -libpmix_la_LDFLAGS = -version-info $(libpmix_so_version) +# libpmix_la_LDFLAGS = -version-info $(libpmix_so_version) if ! PMIX_EMBEDDED_MODE SUBDIRS = . test examples --- origsrc/openmpi-2.0.0rc1/opal/mca/rcache/vma/rcache_vma_tree.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/mca/rcache/vma/rcache_vma_tree.c 2015-12-23 06:49:07.083451200 +0100 @@ -32,6 +32,7 @@ #include "opal_config.h" #include "opal/mca/mca.h" +#include "opal/util/output.h" #include "rcache_vma_tree.h" OBJ_CLASS_INSTANCE(mca_rcache_vma_reg_list_item_t, opal_list_item_t, NULL, NULL); --- origsrc/openmpi-2.0.0rc1/opal/runtime/opal_init.c 2015-12-18 22:52:51.000000000 +0100 +++ src/openmpi-2.0.0rc1/opal/runtime/opal_init.c 2015-12-23 10:23:59.678837300 +0100 @@ -27,6 +27,7 @@ /** @file **/ +#include <unistd.h> #include "opal_config.h" #include "opal/util/malloc.h"