From 6dae8abc2c496dba3678deda749ba72b1b0d0ffa Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 22 Apr 2025 09:15:57 -0600 Subject: [PATCH 1/3] Remove stale solaris configure references A prior commit (PR #13163) removed the stale Solaris components as we no longer support that environment. However, the PR left the Solaris configure references in the code base. This PR removes those references. It also removes a duplicate m4 file (opal_check_os_flavors.m4) that exists in the OAC configure area. All references to the OPAL version have been updated to OAC. Signed-off-by: Ralph Castain --- autogen.pl | 7 +- config/ompi_setup_java.m4 | 17 +---- config/opal_check_os_flavors.m4 | 69 ------------------- configure.ac | 3 +- opal/mca/if/bsdx_ipv4/configure.m4 | 3 +- opal/mca/if/bsdx_ipv6/configure.m4 | 3 +- opal/mca/if/linux_ipv6/configure.m4 | 3 +- opal/mca/if/posix_ipv4/configure.m4 | 3 +- .../shmem/posix/shmem_posix_common_utils.c | 11 +-- opal/mca/shmem/posix/shmem_posix_module.c | 11 +-- opal/mca/threads/pthreads/configure.m4 | 17 ++--- opal/util/path.c | 11 ++- oshmem/mca/memheap/ptmalloc/malloc.c | 7 -- 13 files changed, 27 insertions(+), 138 deletions(-) delete mode 100644 config/opal_check_os_flavors.m4 diff --git a/autogen.pl b/autogen.pl index 1396f7a46b6..ecc726b54eb 100755 --- a/autogen.pl +++ b/autogen.pl @@ -11,6 +11,7 @@ # Copyright (c) 2020 Amazon.com, Inc. or its affiliates. # All Rights reserved. # +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -81,12 +82,6 @@ # Patch program my $patch_prog = "patch"; -# Solaris "patch" doesn't understand unified diffs, and will cause -# autogen.pl to hang with a "File to patch:" prompt. Default to Linux -# "patch", but use "gpatch" on Solaris. -if ($^O eq "solaris") { - $patch_prog = "gpatch"; -} $username = $ENV{USER} || getpwuid($>); $full_hostname = $ENV{HOSTNAME} || `hostname`; diff --git a/config/ompi_setup_java.m4 b/config/ompi_setup_java.m4 index 02029b83dd6..8339fe3cccb 100644 --- a/config/ompi_setup_java.m4 +++ b/config/ompi_setup_java.m4 @@ -18,6 +18,7 @@ dnl Copyright (c) 2013 Intel, Inc. All rights reserved. dnl Copyright (c) 2015-2018 Research Organization for Information Science dnl and Technology (RIST). All rights reserved. dnl Copyright (c) 2017 FUJITSU LIMITED. All rights reserved. +dnl Copyright (c) 2025 Nanook Consulting All rights reserved. dnl $COPYRIGHT$ dnl dnl Additional copyrights may follow @@ -128,17 +129,6 @@ AC_DEFUN([_OMPI_SETUP_JAVA],[ [AC_MSG_RESULT([not found])])]) fi - if test "$ompi_java_found" = "0"; then - # Solaris - ompi_java_dir=/usr/java - AC_MSG_CHECKING([for Java in Solaris locations]) - AS_IF([test -d $ompi_java_dir && test -r "$ompi_java_dir/include/jni.h"], - [AC_MSG_RESULT([found ($ompi_java_dir)]) - with_jdk_headers=$ompi_java_dir/include - with_jdk_bindir=$ompi_java_dir/bin - ompi_java_found=1], - [AC_MSG_RESULT([not found])]) - fi ], [ompi_java_found=1]) @@ -188,11 +178,6 @@ EOF # too. Ugh. AS_IF([test -d "$with_jdk_headers/linux"], [OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/linux"]) - # Solaris JDK also require -I/solaris. - # See if that's there, and if so, add a -I for that, - # too. Ugh. - AS_IF([test -d "$with_jdk_headers/solaris"], - [OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/solaris"]) # Darwin JDK also require -I/darwin. # See if that's there, and if so, add a -I for that, # too. Ugh. diff --git a/config/opal_check_os_flavors.m4 b/config/opal_check_os_flavors.m4 deleted file mode 100644 index fd7ae323f7b..00000000000 --- a/config/opal_check_os_flavors.m4 +++ /dev/null @@ -1,69 +0,0 @@ -dnl -*- shell-script -*- -dnl -dnl Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. -dnl Copyright (c) 2014 Intel, Inc. All rights reserved. -dnl Copyright (c) 2014 Research Organization for Information Science -dnl and Technology (RIST). All rights reserved. -dnl -dnl $COPYRIGHT$ -dnl -dnl Additional copyrights may follow -dnl -dnl $HEADER$ -dnl - -# OPAL_CHECK_OS_FLAVOR_SPECIFIC() -# ---------------------------------------------------- -# Helper macro from OPAL-CHECK-OS-FLAVORS(), below. -# $1 = macro to look for -# $2 = suffix of env variable to set with results -AC_DEFUN([OPAL_CHECK_OS_FLAVOR_SPECIFIC], -[ - AC_MSG_CHECKING([$1]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[#ifndef $1 - #this is not $1, error - #endif - ]])], - [opal_found_$2=yes], - [opal_found_$2=no]) - AC_MSG_RESULT([$opal_found_$2]) -])dnl - -# OPAL_CHECK_OS_FLAVORS() -# ---------------------------------------------------- -# Try to figure out the various OS flavors out there. -# -AC_DEFUN([OPAL_CHECK_OS_FLAVORS], -[ - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__NetBSD__], [netbsd]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__FreeBSD__], [freebsd]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__OpenBSD__], [openbsd]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__DragonFly__], [dragonfly]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__386BSD__], [386bsd]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__bsdi__], [bsdi]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__APPLE__], [apple]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__linux__], [linux]) - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__sun__], [sun]) - AS_IF([test "$opal_found_sun" = "no"], - OPAL_CHECK_OS_FLAVOR_SPECIFIC([__sun], [sun])) - - AS_IF([test "$opal_found_sun" = "yes"], - [opal_have_solaris=1 - CFLAGS="$CFLAGS -D_REENTRANT" - CPPFLAGS="$CPPFLAGS -D_REENTRANT"], - [opal_have_solaris=0]) - AC_DEFINE_UNQUOTED([OPAL_HAVE_SOLARIS], - [$opal_have_solaris], - [Whether or not we have solaris]) - - # check for sockaddr_in (a good sign we have TCP) - AC_CHECK_HEADERS([netdb.h netinet/in.h netinet/tcp.h]) - AC_CHECK_TYPES([struct sockaddr_in], - [opal_found_sockaddr=yes], - [opal_found_sockaddr=no], - [AC_INCLUDES_DEFAULT -#ifdef HAVE_NETINET_IN_H -#include -#endif]) -])dnl diff --git a/configure.ac b/configure.ac index 46cc5d612f3..8dea10cb32a 100644 --- a/configure.ac +++ b/configure.ac @@ -29,6 +29,7 @@ # Copyright (c) 2019 Triad National Security, LLC. All rights # reserved. # Copyright (c) 2023 Jeffrey M. Squyres. All rights reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -995,7 +996,7 @@ AC_CACHE_SAVE opal_show_title "System-specific tests" ################################## -OPAL_CHECK_OS_FLAVORS +OAC_CHECK_OS_FLAVORS diff --git a/opal/mca/if/bsdx_ipv4/configure.m4 b/opal/mca/if/bsdx_ipv4/configure.m4 index d572cc44d70..0f8be58e42c 100644 --- a/opal/mca/if/bsdx_ipv4/configure.m4 +++ b/opal/mca/if/bsdx_ipv4/configure.m4 @@ -3,6 +3,7 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,7 +23,7 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_COMPILE_MODE], [ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [ AC_CONFIG_FILES([opal/mca/if/bsdx_ipv4/Makefile]) - AC_REQUIRE([OPAL_CHECK_OS_FLAVORS]) + AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) # If we found struct sockaddr and we're on any of the BSDs, we're # happy. I.e., this: diff --git a/opal/mca/if/bsdx_ipv6/configure.m4 b/opal/mca/if/bsdx_ipv6/configure.m4 index 4b2122f7012..2784680ffb5 100644 --- a/opal/mca/if/bsdx_ipv6/configure.m4 +++ b/opal/mca/if/bsdx_ipv6/configure.m4 @@ -3,6 +3,7 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,7 +23,7 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_COMPILE_MODE], [ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [ AC_CONFIG_FILES([opal/mca/if/bsdx_ipv6/Makefile]) - AC_REQUIRE([OPAL_CHECK_OS_FLAVORS]) + AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) # If we found struct sockaddr and we're on any of the BSDs, we're # happy. I.e., this: diff --git a/opal/mca/if/linux_ipv6/configure.m4 b/opal/mca/if/linux_ipv6/configure.m4 index 583d59e93fe..454214fa077 100644 --- a/opal/mca/if/linux_ipv6/configure.m4 +++ b/opal/mca/if/linux_ipv6/configure.m4 @@ -3,6 +3,7 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -22,7 +23,7 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_COMPILE_MODE], [ AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [ AC_CONFIG_FILES([opal/mca/if/linux_ipv6/Makefile]) - AC_REQUIRE([OPAL_CHECK_OS_FLAVORS]) + AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) AC_MSG_CHECKING([if we are on Linux with TCP]) # If we have struct sockaddr and we're on Linux, then we're diff --git a/opal/mca/if/posix_ipv4/configure.m4 b/opal/mca/if/posix_ipv4/configure.m4 index 73548efb985..b90894834ab 100644 --- a/opal/mca/if/posix_ipv4/configure.m4 +++ b/opal/mca/if/posix_ipv4/configure.m4 @@ -3,6 +3,7 @@ # Copyright (c) 2010 Cisco Systems, Inc. All rights reserved. # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,7 +26,7 @@ AC_DEFUN([MCA_opal_if_posix_ipv4_CONFIG], [ OPAL_VAR_SCOPE_PUSH([opal_if_posix_ipv4_happy]) opal_if_posix_ipv4_happy=no - AC_REQUIRE([OPAL_CHECK_OS_FLAVORS]) + AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) # If we found struct sockaddr and we're NOT on most of the BSDs, # we're happy. I.e., if posix but not: diff --git a/opal/mca/shmem/posix/shmem_posix_common_utils.c b/opal/mca/shmem/posix/shmem_posix_common_utils.c index 5e1f5416757..4b6d164e145 100644 --- a/opal/mca/shmem/posix/shmem_posix_common_utils.c +++ b/opal/mca/shmem/posix/shmem_posix_common_utils.c @@ -19,6 +19,7 @@ * reserved. * Copyright (c) 2022 IBM Corporation. All rights reserved * + * Copyright (c) 2025 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -33,15 +34,9 @@ # include #endif /* HAVE_FCNTL_H */ #include -#if OPAL_HAVE_SOLARIS && !defined(_POSIX_C_SOURCE) -# define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */ +#ifdef HAVE_SYS_MMAN_H # include -# undef _POSIX_C_SOURCE -#else -# ifdef HAVE_SYS_MMAN_H -# include -# endif /* HAVE_SYS_MMAN_H */ -#endif +#endif /* HAVE_SYS_MMAN_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ diff --git a/opal/mca/shmem/posix/shmem_posix_module.c b/opal/mca/shmem/posix/shmem_posix_module.c index a2f781819e6..ef1843535f7 100644 --- a/opal/mca/shmem/posix/shmem_posix_module.c +++ b/opal/mca/shmem/posix/shmem_posix_module.c @@ -17,6 +17,7 @@ * Copyright (c) 2019 Triad National Security, LLC. All rights * reserved. * Copyright (c) 2022 IBM Corporation. All rights reserved + * Copyright (c) 2025 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -30,15 +31,9 @@ #ifdef HAVE_FCNTL_H # include #endif /* HAVE_FCNTL_H */ -#if OPAL_HAVE_SOLARIS && !defined(_POSIX_C_SOURCE) -# define _POSIX_C_SOURCE 200112L /* Required for shm_{open,unlink} decls */ +#ifdef HAVE_SYS_MMAN_H # include -# undef _POSIX_C_SOURCE -#else -# ifdef HAVE_SYS_MMAN_H -# include -# endif /* HAVE_SYS_MMAN_H */ -#endif +#endif /* HAVE_SYS_MMAN_H */ #ifdef HAVE_UNISTD_H # include #endif /* HAVE_UNISTD_H */ diff --git a/opal/mca/threads/pthreads/configure.m4 b/opal/mca/threads/pthreads/configure.m4 index 0bf263e7570..af0f5de2231 100644 --- a/opal/mca/threads/pthreads/configure.m4 +++ b/opal/mca/threads/pthreads/configure.m4 @@ -16,6 +16,7 @@ # Copyright (c) 2019 Sandia National Laboratories. All rights reserved. # Copyright (c) 2019 Triad National Security, LLC. All rights # reserved. +# Copyright (c) 2025 Nanook Consulting All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -363,23 +364,15 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[ # -Kthread: # -kthread: FreeBSD kernel threads # -pthread: Modern GCC (most all platforms) -# -pthreads: GCC on solaris # -mthreads: -# -mt: Solaris native compilers / HP-UX aCC +# -mt: HP-UX aCC # # Put -mt before -mthreads because HP-UX aCC will properly compile # with -mthreads (reading as -mt), but emit a warning about unknown -# flags hreads. Stupid compilers. +# flags threads. Stupid compilers. OPAL_VAR_SCOPE_PUSH([pflags]) -case "${host_cpu}-${host_os}" in - *solaris*) - pflags="-pthread -pthreads -mt" - ;; - *) - pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads" - ;; -esac +pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads" # Only run C++ and Fortran if those compilers were found @@ -705,7 +698,7 @@ AC_DEFUN([MCA_opal_threads_pthreads_COMPILE_MODE], [ # If component was selected, $1 will be 1 and we should set the base header AC_DEFUN([MCA_opal_threads_pthreads_POST_CONFIG],[ - AS_IF([test "$1" = "1"], + AS_IF([test "$1" = "1"], [opal_thread_type_found="pthreads" AC_DEFINE_UNQUOTED([MCA_threads_base_include_HEADER], ["opal/mca/threads/pthreads/threads_pthreads_threads.h"], diff --git a/opal/util/path.c b/opal/util/path.c index 6931de8756b..9e4200a9384 100644 --- a/opal/util/path.c +++ b/opal/util/path.c @@ -17,6 +17,7 @@ * Copyright (c) 2016 University of Houston. All rights reserved. * Copyright (c) 2016 Research Organization for Information Science * and Technology (RIST). All rights reserved. + * Copyright (c) 2025 Nanook Consulting All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -86,7 +87,7 @@ #endif /* - * Note that some OS's (e.g., NetBSD and Solaris) have statfs(), but + * Note that some OS's (e.g., NetBSD has statfs(), but * no struct statfs (!). So check to make sure we have struct statfs * before allowing the use of statfs(). */ @@ -409,8 +410,8 @@ char *opal_find_absolute_path(char *app_name) /** * Read real FS type from /etc/mtab, needed to translate autofs fs type into real fs type - * TODO: solaris? OSX? - * Limitations: autofs on solaris/osx will be assumed as "nfs" type + * TODO: OSX? + * Limitations: autofs on osx will be assumed as "nfs" type */ static char *opal_check_mtab(char *dev_path) @@ -457,10 +458,6 @@ static char *opal_check_mtab(char *dev_path) * statvfs (const char *path, struct statvfs *buf); * with unsigned long f_fsid; -- returns wrong info * return 0 success, -1 on failure with errno set. - * Solaris: - * statvfs (const char *path, struct statvfs *buf); - * with f_basetype, contains a string of length FSTYPSZ - * return 0 success, -1 on failure with errno set. * FreeBSD: * statfs(const char *path, struct statfs *buf); * with f_fstypename, contains a string of length MFSNAMELEN diff --git a/oshmem/mca/memheap/ptmalloc/malloc.c b/oshmem/mca/memheap/ptmalloc/malloc.c index f5a77108e25..0b11a6fb327 100644 --- a/oshmem/mca/memheap/ptmalloc/malloc.c +++ b/oshmem/mca/memheap/ptmalloc/malloc.c @@ -1263,9 +1263,6 @@ extern void* sbrk(ptrdiff_t); #if USE_LOCKS #ifndef WIN32 #include -#if defined (__SVR4) && defined (__sun) /* solaris */ -#include -#endif /* solaris */ #else #ifndef _M_AMD64 /* These are already defined on AMD64 builds */ @@ -1544,15 +1541,11 @@ static FORCEINLINE int pthread_acquire_lock (MLOCK_T *sl) { break; } if ((++spins & SPINS_PER_YIELD) == 0) { -#if defined (__SVR4) && defined (__sun) /* solaris */ - thr_yield(); -#else #ifdef linux sched_yield(); #else /* no-op yield on unknown systems */ ; #endif /* linux */ -#endif /* solaris */ } } } From f1201ab0e856512307f2b58aaaa61e8b81a66f64 Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 22 Apr 2025 14:46:46 -0600 Subject: [PATCH 2/3] Preserve the "hreads" comment, but make it clearer that the unusual spelling is intentional. Signed-off-by: Ralph Castain --- opal/mca/threads/pthreads/configure.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opal/mca/threads/pthreads/configure.m4 b/opal/mca/threads/pthreads/configure.m4 index af0f5de2231..126653dc008 100644 --- a/opal/mca/threads/pthreads/configure.m4 +++ b/opal/mca/threads/pthreads/configure.m4 @@ -369,7 +369,7 @@ AC_DEFUN([OPAL_INTL_POSIX_THREADS_SPECIAL_FLAGS],[ # # Put -mt before -mthreads because HP-UX aCC will properly compile # with -mthreads (reading as -mt), but emit a warning about unknown -# flags threads. Stupid compilers. +# flags "hreads". Stupid compilers. OPAL_VAR_SCOPE_PUSH([pflags]) pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads" From f744b78b64ca80acc574029deb01871ad2e35b27 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 25 Apr 2025 09:03:51 -0400 Subject: [PATCH 3/3] opal/mca/if: fix "struct sockaddr_in" and OS checks Found a few more places we needed to adjust for changing from OPAL_CHECK_OS_FLAVORS to OAC_CHECK_OS_FLAVORS. Also, in the opal/mca/if components, we have configure.m4 scripts that explicitly check $opal_found_sockaddr. This was a problem for a few reasons: 1. We just deleted the setting of $opal_found_sockaddr from the previous OPAL_CHECK_OS_FLAVORS macro (*why* it was set in that macro isn't really clear -- "struct sockaddr" doesn't really have anything to do with checking OS flavors). 2. The old OPAL_CHECK_OS_FLAVORS macro actually checking for "struct sockaddr_in", not "struct sockaddr". This led to a lot of confusion in this round of debugging. Also, the additional network header checks and check for struct sockaddr_in in OPAL_CHECK_OS_FLAVORS were redundant: they were already being performed in OMPI's top-level configure.ac. Deleting these redundant tests -- and indeed, deleting all of OPAL_CHECK_OS_FLAVORS -- is fine. But we did need to set a global variable for the opal/mca/if/*/configure.m4 scripts to check. This commit therefore does the following: * Adjusts the configure.m4 in the various opal/mca/if components that were previously looking at $opal_found_sockaddr. * Each configure.m4 now looks for ac_cv_type_struct_sockaddr_in[6] as relevant. * Also update them to use the OAC OS result variables. * Update relevant comments to explain that we're using $ac_cv_type_... instead of calling AC_CHECK_TYPES again because that test is a bit cumbersome with all the required #includes. * Slightly modify the test/results output emitted by these configure tests to make it clear that we're not calling AC_CHECK_TYPES. Do this because the "(cached)" output that it previously emitted caused considerable confusion during this round of debugging (i.e., I assumed it was coming from regular Autoconf test caching, which is an entirely different mechanism). Signed-off-by: Jeff Squyres --- opal/mca/if/bsdx_ipv4/configure.m4 | 22 ++++++++++++---------- opal/mca/if/bsdx_ipv6/configure.m4 | 25 ++++++++++++++----------- opal/mca/if/linux_ipv6/configure.m4 | 10 ++++++---- opal/mca/if/posix_ipv4/configure.m4 | 17 ++++++++++------- 4 files changed, 42 insertions(+), 32 deletions(-) diff --git a/opal/mca/if/bsdx_ipv4/configure.m4 b/opal/mca/if/bsdx_ipv4/configure.m4 index 0f8be58e42c..a373b58f949 100644 --- a/opal/mca/if/bsdx_ipv4/configure.m4 +++ b/opal/mca/if/bsdx_ipv4/configure.m4 @@ -4,6 +4,7 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # Copyright (c) 2025 Nanook Consulting All rights reserved. +# Copyright (c) 2025 Jeffrey M. Squyres. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,23 +26,24 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv4_CONFIG], [ AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) - # If we found struct sockaddr and we're on any of the BSDs, we're + # If we previously found struct sockaddr_in (we don't repeat the + # AC CHECK_TYPES test here simply because it's cumbersome with all + # the required #includes) and we're on any of the BSDs, we're # happy. I.e., this: #if defined(__NetBSD__) || defined(__FreeBSD__) || \ # defined(__OpenBSD__) || defined(__DragonFly__) - AC_MSG_CHECKING([struct sockaddr]) - AS_IF([test "$opal_found_sockaddr" = "yes"], - [AC_MSG_RESULT([yes (cached)]) + AC_MSG_CHECKING([struct sockaddr_in again]) + AS_IF([test "$ac_cv_type_struct_sockaddr_in" = "yes"], + [AC_MSG_RESULT([yes (OPAL cached)]) AC_MSG_CHECKING([NetBSD, FreeBSD, OpenBSD, or DragonFly]) - AS_IF([test "$opal_found_netbsd" = "yes" || \ - test "$opal_found_freebsd" = "yes" || \ - test "$opal_found_openbsd" = "yes" || \ - test "$opal_found_dragonfly" = "yes"], + AS_IF([test "$oac_found_netbsd" = "yes" || \ + test "$oac_found_freebsd" = "yes" || \ + test "$oac_found_openbsd" = "yes" || \ + test "$oac_found_dragonfly" = "yes"], [AC_MSG_RESULT([yes]) $1], [AC_MSG_RESULT([no]) $2])], - [AC_MSG_RESULT([no (cached)]) + [AC_MSG_RESULT([no (OPAL cached)]) $2]) ]) - diff --git a/opal/mca/if/bsdx_ipv6/configure.m4 b/opal/mca/if/bsdx_ipv6/configure.m4 index 2784680ffb5..ed38208e65e 100644 --- a/opal/mca/if/bsdx_ipv6/configure.m4 +++ b/opal/mca/if/bsdx_ipv6/configure.m4 @@ -4,6 +4,7 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # Copyright (c) 2025 Nanook Consulting All rights reserved. +# Copyright (c) 2025 Jeffrey M. Squyres. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,24 +26,26 @@ AC_DEFUN([MCA_opal_if_bsdx_ipv6_CONFIG], [ AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) - # If we found struct sockaddr and we're on any of the BSDs, we're + # If we previously found struct sockaddr_in6 (we don't repeat the + # AC CHECK_TYPES test here simply because it's cumbersome with all + # the required #includes) and we're on any of the BSDs, we're # happy. I.e., this: #if defined( __NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || \ # defined(__386BSD__) || defined(__bsdi__) || defined(__APPLE__) - AC_MSG_CHECKING([struct sockaddr]) - AS_IF([test "$opal_found_sockaddr" = "yes"], - [AC_MSG_RESULT([yes (cached)]) + AC_MSG_CHECKING([struct sockaddr_in6 again]) + AS_IF([test "$ac_cv_type_struct_sockaddr_in6" = "yes"], + [AC_MSG_RESULT([yes (OPAL cached)]) AC_MSG_CHECKING([some flavor of BSD]) - AS_IF([test "$opal_found_netbsd" = "yes" || \ - test "$opal_found_freebsd" = "yes" || \ - test "$opal_found_openbsd" = "yes" || \ - test "$opal_found_386bsd" = "yes" || \ - test "$opal_found_bsdi" = "yes" || - test "$opal_found_apple" = "yes"], + AS_IF([test "$oac_found_netbsd" = "yes" || \ + test "$oac_found_freebsd" = "yes" || \ + test "$oac_found_openbsd" = "yes" || \ + test "$oac_found_386bsd" = "yes" || \ + test "$oac_found_bsdi" = "yes" || + test "$oac_found_apple" = "yes"], [AC_MSG_RESULT([yes]) $1], [AC_MSG_RESULT([no]) $2])], - [AC_MSG_RESULT([no (cached)]) + [AC_MSG_RESULT([no (OPAL cached)]) $2]) ])dnl diff --git a/opal/mca/if/linux_ipv6/configure.m4 b/opal/mca/if/linux_ipv6/configure.m4 index 454214fa077..096fdbe5665 100644 --- a/opal/mca/if/linux_ipv6/configure.m4 +++ b/opal/mca/if/linux_ipv6/configure.m4 @@ -4,6 +4,7 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # Copyright (c) 2025 Nanook Consulting All rights reserved. +# Copyright (c) 2025 Jeffrey M. Squyres. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -25,10 +26,11 @@ AC_DEFUN([MCA_opal_if_linux_ipv6_CONFIG], [ AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) - AC_MSG_CHECKING([if we are on Linux with TCP]) - # If we have struct sockaddr and we're on Linux, then we're - # happy. - AS_IF([test "$opal_found_sockaddr" = "yes" && test "$opal_found_linux" = "yes"], + # If we previously found struct sockaddr_in6 (we don't repeat the + # AC CHECK_TYPES test here simply because it's cumbersome with all + # the required #includes) and we're on Linux, we're happy. + AC_MSG_CHECKING([for Linux with struct sockaddr_in6]) + AS_IF([test "$ac_cv_type_struct_sockaddr_in6" = "yes" && test "$oac_found_linux" = "yes"], [AC_MSG_RESULT([yes]) $1], [AC_MSG_RESULT([no]) diff --git a/opal/mca/if/posix_ipv4/configure.m4 b/opal/mca/if/posix_ipv4/configure.m4 index b90894834ab..f5574434937 100644 --- a/opal/mca/if/posix_ipv4/configure.m4 +++ b/opal/mca/if/posix_ipv4/configure.m4 @@ -4,6 +4,7 @@ # Copyright (c) 2015 Research Organization for Information Science # and Technology (RIST). All rights reserved. # Copyright (c) 2025 Nanook Consulting All rights reserved. +# Copyright (c) 2025 Jeffrey M. Squyres. All rights reserved. # $COPYRIGHT$ # # Additional copyrights may follow @@ -28,20 +29,22 @@ AC_DEFUN([MCA_opal_if_posix_ipv4_CONFIG], [ AC_REQUIRE([OAC_CHECK_OS_FLAVORS]) - # If we found struct sockaddr and we're NOT on most of the BSDs, - # we're happy. I.e., if posix but not: + # If we previously found struct sockaddr_in (we don't repeat the + # AC CHECK_TYPES test here simply because it's cumbersome with all + # the required #includes) and we're NOT on most of the BSDs, we're + # happy. I.e., this: #if defined(__NetBSD__) || defined(__FreeBSD__) || \ # defined(__OpenBSD__) || defined(__DragonFly__) - AC_MSG_CHECKING([struct sockaddr]) - AS_IF([test "$opal_found_sockaddr" = "yes"], - [AC_MSG_RESULT([yes (cached)]) + AC_MSG_CHECKING([struct sockaddr_in again]) + AS_IF([test "$ac_cv_type_struct_sockaddr_in" = "yes"], + [AC_MSG_RESULT([yes (OPAL cached)]) AC_MSG_CHECKING([not NetBSD, FreeBSD, OpenBSD, or DragonFly]) - AS_IF([test "$opal_found_netbsd" = "no" && test "$opal_found_freebsd" = "no" && test "$opal_found_openbsd" = "no" && test "$opal_found_dragonfly" = "no"], + AS_IF([test "$oac_found_netbsd" = "no" && test "$oac_found_freebsd" = "no" && test "$oac_found_openbsd" = "no" && test "$oac_found_dragonfly" = "no"], [AC_MSG_RESULT([yes]) opal_if_posix_ipv4_happy=yes], [AC_MSG_RESULT([no])] )], - [AC_MSG_RESULT([no (cached)])] + [AC_MSG_RESULT([no (OPAL cached)])] ) AS_IF([test "$opal_if_posix_ipv4_happy" = "yes"],