Thanks Paul,

i fixed that (and 4 more errors that popped up) in the attached patch


i opened https://github.com/open-mpi/ompi/pull/2110, but will likely merge the first 3 commits quite soon.

/* the last two commits fix autogen.pl on OpenBSD 6.0 and need a review */

so you'd better use the attached patch for now.


/* you need to run autogen.pl, if you do not have recent autotools on your OpenBSD 6.0 box, you can

apply the patch on an other platform, ./autogen.pl && ./configure && make dist, and copy the generated tarball to

OpenBSD */


Cheers,


Gilles



On 9/23/2016 3:33 AM, Paul Hargrove wrote:
When trying to test PR2107 on OpenBSD-6 I was blocked by the following error, which is also present in 'master'.

../../../ompi/opal/util/if.c: In function 'opal_ifisloopback':
../../../ompi/opal/util/if.c:710: error: 'IFF_LOOPBACK' undeclared (first use in this function) ../../../ompi/opal/util/if.c:710: error: (Each undeclared identifier is reported only once
../../../ompi/opal/util/if.c:710: error: for each function it appears in.)
../../../ompi/opal/util/if.c: In function 'opal_ifgetaliases':
../../../ompi/opal/util/if.c:791: error: 'IFF_LOOPBACK' undeclared (first use in this function)

The constant IFF_LOOPBACK is defined in net/if.h, as expected.
However, opal_config.h says:

    /* #undef HAVE_NET_IF_H */


Related to that is the following output from configure:

    checking net/if.h usability... no
    checking net/if.h presence... yes
    configure: WARNING: net/if.h: present but cannot be compiled
    configure: WARNING: net/if.h:     check for missing prerequisite
    headers?
    configure: WARNING: net/if.h: see the Autoconf documentation
    configure: WARNING: net/if.h:     section "Present But Cannot Be
    Compiled"
    configure: WARNING: net/if.h: proceeding with the compiler's result
    configure: WARNING:     ##
    ------------------------------------------------------ ##
    configure: WARNING:     ## Report this to
    http://www.open-mpi.org/community/help/ ##
    configure: WARNING:     ##
    ------------------------------------------------------ ##
    checking for net/if.h... no


Details from config.log:

    configure:62402: checking net/if.h usability
    configure:62402: gcc -std=gnu99 -c -O3 -DNDEBUG -finline-functions
    -fno-strict-aliasing  conftest.c >&5
    In file included from conftest.c:433:
    /usr/include/net/if.h:358: error: field 'ifru_addr' has incomplete
    type
    /usr/include/net/if.h:359: error: field 'ifru_dstaddr' has
    incomplete type
    /usr/include/net/if.h:360: error: field 'ifru_broadaddr' has
    incomplete type
    /usr/include/net/if.h:387: error: field 'ifrau_addr' has
    incomplete type
    /usr/include/net/if.h:393: error: field 'ifra_dstaddr' has
    incomplete type
    /usr/include/net/if.h:395: error: field 'ifra_mask' has incomplete
    type
    /usr/include/net/if.h:438: error: field 'addr' has incomplete type
    /usr/include/net/if.h:439: error: field 'dstaddr' has incomplete type
    /usr/include/net/if.h:445: error: expected
    specifier-qualifier-list before 'sa_family_t'
    In file included from /usr/include/net/if.h:454,
     from conftest.c:433:
    /usr/include/net/if_arp.h:79: error: field 'arp_pa' has incomplete
    type
    /usr/include/net/if_arp.h:80: error: field 'arp_ha' has incomplete
    type


Man page for if_nametoindex() and friends show:

         #include <sys/types.h>
         #include <sys/socket.h>
         #include <net/if.h>


It looks like configure.ac <http://configure.ac> is *trying* to deal with the sys/socket.h dependency:

    # Needed to work around Darwin requiring sys/socket.h for
    # net/if.h
    AC_CHECK_HEADERS([net/if.h], [], [],
        [#include <stdio.h>
    #if STDC_HEADERS
    # include <stdlib.h>
    # include <stddef.h>
    #else
    # if HAVE_STDLIB_H
    #  include <stdlib.h>
    # endif
    #endif
    #if HAVE_SYS_SOCKET_H
    # include <sys/socket.h>
    #endif
    ])


However, config.log suggests that the previous failure has been cached, making this (second) test for net/if.h a no-op:

    configure:62453: checking for net/if.h
    configure:62453: result: no



-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

diff --git a/config/ompi_fortran_check.m4 b/config/ompi_fortran_check.m4
index 46ecf24..51d1e03 100644
--- a/config/ompi_fortran_check.m4
+++ b/config/ompi_fortran_check.m4
@@ -11,7 +11,7 @@ dnl                         University of Stuttgart.  All 
rights reserved.
 dnl Copyright (c) 2004-2005 The Regents of the University of California.
 dnl                         All rights reserved.
 dnl Copyright (c) 2011-2012 Cisco Systems, Inc.  All rights reserved.
-dnl Copyright (c) 2015      Research Organization for Information Science
+dnl Copyright (c) 2015-2016 Research Organization for Information Science
 dnl                         and Technology (RIST). All rights reserved.
 dnl $COPYRIGHT$
 dnl
@@ -165,38 +165,38 @@ AC_DEFUN([OMPI_FORTRAN_CHECK], [
     # the result of the BLUm4E in a shell variable and use that in
     # AC_DEFINE_UNQUOTED), autoheader won't put them in the
     # AC_CONFIG_HEADER (or AM_CONFIG_HEADER, in our case).
-    
AC_DEFINE_UNQUOTED([OMPI_HAVE_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
+    
AC_DEFINE_UNQUOTED([OMPI_HAVE_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [[*]], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
                        [$ofc_have_type],
                        [Whether we have Fortran $1 or not])
-    
AC_DEFINE_UNQUOTED([OMPI_SIZEOF_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
+    
AC_DEFINE_UNQUOTED([OMPI_SIZEOF_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [[*]], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
                        [$ofc_type_size],
                        [Size of Fortran $1])
-    
AC_DEFINE_UNQUOTED([OMPI_ALIGNMENT_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
+    
AC_DEFINE_UNQUOTED([OMPI_ALIGNMENT_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [[*]], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
                        [$ofc_type_alignment],
                        [Alignment of Fortran $1])
-    
AC_DEFINE_UNQUOTED([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
+    
AC_DEFINE_UNQUOTED([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1],
 [[*]], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
                        [$ofc_type_kind],
                        [Fortrn KIND number for $1])
     if test "$3" != "" && test "$ofc_define_type" = "yes"; then
-        
AC_DEFINE_UNQUOTED([ompi_fortran_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], 
[*], []), [[^a-zA-Z0-9_]], [_]), [A-Z], [a-z])[_t],
+        
AC_DEFINE_UNQUOTED([ompi_fortran_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], 
[[*]], []), [[^a-zA-Z0-9_]], [_]), [A-Z], [a-z])[_t],
                            [$ofc_c_type],
                            [C type corresponding to Fortran $1])
     fi
 
     # Save some in shell variables for later use (e.g., need
     # OMPI_SIZEOF_FORTRAN_INTEGER in OMPI_FORTRAN_GET_HANDLE_MAX)
-    [OMPI_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], 
[_])[_C_TYPE=$ofc_c_type]
-    [OMPI_KIND_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_kind]
-    [OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_have_type]
-    [OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_size]
-    [OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_alignment]
+    [OMPI_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_])[_C_TYPE=$ofc_c_type]
+    [OMPI_KIND_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_kind]
+    [OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_have_type]
+    [OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_size]
+    [OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_])[=$ofc_type_alignment]
 
     # Wow, this is sick.  But it works!  :-)
-    AC_SUBST([OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_]))
-    AC_SUBST([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], 
[*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]))
-    AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_]))
-    AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), 
[[^a-zA-Z0-9_]], [_]))
-    AC_SUBST([OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], 
[]), [[^a-zA-Z0-9_]], [_]))
+    AC_SUBST([OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_]))
+    AC_SUBST([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], 
[[*]], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]))
+    AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_]))
+    AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], []), 
[[^a-zA-Z0-9_]], [_]))
+    AC_SUBST([OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [[*]], 
[]), [[^a-zA-Z0-9_]], [_]))
 
     # Clean up
     OPAL_VAR_SCOPE_POP
diff --git a/config/opal_get_version.m4sh b/config/opal_get_version.m4sh
index d9d45d9..c9964a0 100644
--- a/config/opal_get_version.m4sh
+++ b/config/opal_get_version.m4sh
@@ -15,6 +15,8 @@ m4_divert_push([SCRIPT])dnl
 # Copyright (c) 2004-2005 The Regents of the University of California.
 #                         All rights reserved.
 # Copyright (c) 2008-2015 Cisco Systems, Inc.  All rights reserved.
+# Copyright (c) 2016      Research Organization for Information Science
+#                         and Technology (RIST). All rights reserved.
 # $COPYRIGHT$
 #
 # Additional copyrights may follow
@@ -91,3 +93,4 @@ esac
 # All done
 
 exit 0
+m4_divert_pop([SCRIPT])dnl
diff --git a/configure.ac b/configure.ac
index c38f8e9c..f2e7db9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -584,7 +584,7 @@ AC_CHECK_HEADERS([alloca.h aio.h arpa/inet.h dirent.h \
     libutil.h memory.h netdb.h netinet/in.h netinet/tcp.h \
     poll.h pthread.h pty.h pwd.h sched.h \
     strings.h stropts.h linux/ethtool.h linux/sockios.h \
-    net/if.h sys/fcntl.h sys/ipc.h sys/shm.h \
+    sys/fcntl.h sys/ipc.h sys/shm.h \
     sys/ioctl.h sys/mman.h sys/param.h sys/queue.h \
     sys/resource.h sys/select.h sys/socket.h sys/sockio.h \
     sys/stat.h sys/statfs.h sys/statvfs.h sys/time.h sys/tree.h \
diff --git a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c 
b/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c
index 55c93bd..9c4c6fd 100644
--- a/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c
+++ b/opal/mca/pmix/pmix3x/pmix/src/server/pmix_server_ops.c
@@ -1,7 +1,7 @@
 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
 /*
  * Copyright (c) 2014-2016 Intel, Inc.  All rights reserved.
- * Copyright (c) 2014-2015 Research Organization for Information Science
+ * Copyright (c) 2014-2016 Research Organization for Information Science
  *                         and Technology (RIST). All rights reserved.
  * Copyright (c) 2014-2015 Artem Y. Polyakov <artpo...@gmail.com>.
  *                         All rights reserved.
@@ -27,6 +27,9 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
 #include <fcntl.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
diff --git a/opal/util/ethtool.c b/opal/util/ethtool.c
index 68afa89..c44bed2 100644
--- a/opal/util/ethtool.c
+++ b/opal/util/ethtool.c
@@ -1,8 +1,8 @@
 /*
- * Copyright (c) 2016 Karol Mroz.  All rights reserved.
+ * Copyright (c) 2016      Karol Mroz.  All rights reserved.
  * Copyright (c) 2016      Research Organization for Information Science
  *                         and Technology (RIST). All rights reserved.
- * Copyright (c) 2016 Cisco Systems, Inc.  All rights reserved.
+ * Copyright (c) 2016      Cisco Systems, Inc.  All rights reserved.
  * $COPYRIGHT$
  *
  * Additional copyrights may follow
@@ -18,6 +18,12 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
 #ifdef HAVE_NET_IF_H
 #include <net/if.h>
 #endif
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to