Hello, > Can you try the attached patch and tell me if you get sctp configured?
Yes, it works! Thank you very much for your help. > > This looks like a missing check in the sctp configure.m4. I am > > working on a patch. > > > > --td > > > > On 6/5/2012 10:10 AM, Siegmar Gross wrote: > >> Hello, > >> > >> I compiled "openmpi-1.6" on "Solaris 10 sparc" and "Solaris 10 x86" > >> with "gcc-4.6.2" and "Sun C 5.12". Today I searched my log-files for > >> "WARNING" and found the following message. > >> > >> WARNING: netinet/sctp.h: present but cannot be compiled > >> WARNING: netinet/sctp.h: check for missing prerequisite headers? > >> WARNING: netinet/sctp.h: see the Autoconf documentation > >> WARNING: netinet/sctp.h: section "Present But Cannot Be Compiled" > >> WARNING: netinet/sctp.h: proceeding with the compiler's result > >> WARNING: ## ------------------------------------------------------ ## > >> WARNING: ## Report this tohttp://www.open-mpi.org/community/help/ ## > >> WARNING: ## ------------------------------------------------------ ## > >> > >> Looking in "config.log" showed that some types are undefined. > >> > >> tyr openmpi-1.6-SunOS.sparc.64_cc 323 grep sctp config.log > >> configure:119568: result: elan, mx, ofud, openib, portals, sctp, sm, tcp, > >> udapl > >> configure:125730: checking for MCA component btl:sctp compile mode > >> configure:125752: checking --with-sctp value > >> configure:125862: checking --with-sctp-libdir value > >> configure:125946: checking netinet/sctp.h usability > >> "/usr/include/netinet/sctp.h", line 228: > >> incomplete struct/union/enum sockaddr_storage: spc_aaddr > >> "/usr/include/netinet/sctp.h", line 530: syntax error before or at: > >> socklen_t > >> "/usr/include/netinet/sctp.h", line 533: syntax error before or at: > >> socklen_t > >> "/usr/include/netinet/sctp.h", line 537: syntax error before or at: > >> socklen_t > >> "/usr/include/netinet/sctp.h", line 772: syntax error before or at: > >> ipaddr_t > >> "/usr/include/netinet/sctp.h", line 779: syntax error before or at: > >> in6_addr_t > >> | #include<netinet/sctp.h> > >> ... > >> > >> The missing types are defined via<netinet/in.h>. In which files must > >> I include this header file to avoid the warning? Thank you very much > >> for any help in advance. Kind regards Siegmar
Index: ompi/mca/btl/sctp/configure.m4 =================================================================== --- ompi/mca/btl/sctp/configure.m4 (revision 26562) +++ ompi/mca/btl/sctp/configure.m4 (working copy) @@ -11,6 +11,7 @@ # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. # Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. +# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -100,6 +101,18 @@ AS_IF([test ! -z "$with_sctp_libdir" -a "$with_sctp_libdir" != "yes"], [ompi_check_sctp_libdir="$with_sctp_libdir"]) + # Check for in.h dependency outside OMPI_CHECK_PACKAGE because it cannot + # handle non-system detected dependencies. This is specifically an issue + # with Oracale Solaris because sctp.h requires in.h to define some types where + # Linux does not. + AC_CHECK_HEADER([netinet/in.h]) + AC_CHECK_HEADER([netinet/sctp.h], + [], + [], + [ +#ifdef HAVE_NETINET_IN_H +#include <netinet/in.h> +#endif]) OMPI_CHECK_PACKAGE([$1], [netinet/sctp.h], [$ompi_sctp_api_libname], Index: config/ompi_check_package.m4 =================================================================== --- config/ompi_check_package.m4 (revision 26562) +++ config/ompi_check_package.m4 (working copy) @@ -10,6 +10,7 @@ # University of Stuttgart. All rights reserved. # Copyright (c) 2004-2005 The Regents of the University of California. # All rights reserved. +# Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -35,18 +36,31 @@ AS_IF([test "$3" = "/usr" -o "$3" = "/usr/local"], [ # try as is... AC_VERBOSE([looking for header without includes]) - AC_CHECK_HEADER([$2], [ompi_check_package_header_happy="yes"], - [ompi_check_package_header_happy="no"]) + # check to see if the header file was detected previously and only + # do a check if it was not. This is necessary to do for + # things like sctp.h that has a dependency that we cannot detect + # in this part of the code. + AS_IF(AS_VAR_IF([ompi_Header], [no], + [AC_CHECK_HEADER([$2], [ompi_check_package_header_happy="yes"], + [ompi_check_package_header_happy="no"]) + ])) AS_IF([test "$ompi_check_package_header_happy" = "no"], [# no go on the as is - reset the cache and try again - unset ompi_Header])]) + unset ompi_Header]) + ]) AS_IF([test "$ompi_check_package_header_happy" = "no"], - [AS_IF([test "$3" != ""], + AS_IF([test "$3" != ""], [$1_CPPFLAGS="$$1_CPPFLAGS -I$3/include" CPPFLAGS="$CPPFLAGS -I$3/include"]) - AC_CHECK_HEADER([$2], [$4], [$5])], - [$4]) + # check to see if the header file was detected previously and only + # do a check if it was not. This is necessary to do for + # things like sctp.h that has a dependency that we cannot detect + # in this part of the code. + AS_IF(AS_VAR_IF([ompi_Header], [no], + [AC_CHECK_HEADER([$2], [$4], [$5])]), + [$4]) + ) unset ompi_check_package_header_happy]) dnl AS_VAR_POPDEF([ompi_Header])dnl