diff --git a/NEWS b/NEWS index bd92c3f64a749c861998a397209e2ccf44907b8c..4f84484bd1598f7a5d1d5539e975ceee38f670f9 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - scontrol delete block and update block can now remove blocks on dynamic laid out systems. -- BLUEGENE - Vastly improve Dynamic layout mode algorithm. + -- Address some issues for SLURM support of Solaris. * Changes in SLURM 2.1.0-pre2 ============================= diff --git a/auxdir/x_ac_printf_null.m4 b/auxdir/x_ac_printf_null.m4 index 7d9840dacd9cb40fe66858d6db94acc2c79f4003..38df4a8d4494219989abc43829ec1541e6709e80 100644 --- a/auxdir/x_ac_printf_null.m4 +++ b/auxdir/x_ac_printf_null.m4 @@ -25,6 +25,11 @@ # workaround isn't always easy to apply (or it is too late data has been # lost or corrupted by that point)." # +# In the case of SLURM, setting LD_PRELOAD to the appropriate value before +# building the code or running any applications will fix the problem. We +# expect to release a version of SLURM supporting OpenSolaris about the same +# as a version of OpenSolaris with this problem fixed is released, so the +# use of LD_PRELOAD will be temporary. ##***************************************************************************** AC_DEFUN([X_AC_PRINTF_NULL], [ @@ -32,12 +37,23 @@ AC_DEFUN([X_AC_PRINTF_NULL], [ AC_TRY_RUN([ #include <stdio.h> #include <stdlib.h> - int main() { printf("%s", NULL); exit(0); } ], + int main() { char tmp[8]; snprintf(tmp,8,"%s",NULL); exit(0); } ], printf_null_ok=yes, printf_null_ok=no) - if test "$printf_null_ok" == "no"; then - AC_MSG_ERROR([printf("%s", NULL) results in abort. If using OpenSolaris, upgrade to release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1.]) + case "$host" in + *solaris*) have_solaris=yes ;; + *) have_solaris=no ;; + esac + + if test "$printf_null_ok" == "no" -a "$have_solaris" == "yes" -a -d /usr/lib64/0@0.so.1; then + AC_MSG_ERROR([printf("%s", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib64/0@0.so.1]) + elif test "$printf_null_ok" == "no" -a "$have_solaris" == "yes" -a -d /usr/lib/0@0.so.1; then + AC_MSG_ERROR([printf("%s", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1]) + elif test "$printf_null_ok" == "no" -a "$have_solaris" == "yes"; then + AC_MSG_ERROR([printf("%s", NULL) results in abort, upgrade to OpenSolaris release 119]) + elif test "$printf_null_ok" == "no"; then + AC_MSG_ERROR([printf("%s", NULL) results in abort]) fi ]) diff --git a/configure b/configure index 9b1fca190a7a2d7015b8052d4e68e19374dbbe98..cf0d84189658014e8e8fb0822ce17cb776135133 100755 --- a/configure +++ b/configure @@ -23146,7 +23146,7 @@ cat >>conftest.$ac_ext <<_ACEOF #include <stdio.h> #include <stdlib.h> - int main() { printf("%s", NULL); exit(0); } + int main() { char tmp[8]; snprintf(tmp,8,"%s",NULL); exit(0); } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" @@ -23185,9 +23185,26 @@ fi - if test "$printf_null_ok" == "no"; then - { { $as_echo "$as_me:$LINENO: error: printf(\"%s\", NULL) results in abort. If using OpenSolaris, upgrade to release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1." >&5 -$as_echo "$as_me: error: printf(\"%s\", NULL) results in abort. If using OpenSolaris, upgrade to release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1." >&2;} + case "$host" in + *solaris*) have_solaris=yes ;; + *) have_solaris=no ;; + esac + + if test "$printf_null_ok" == "no" -a "$have_solaris" == "yes" -a -d /usr/lib64/0@0.so.1; then + { { $as_echo "$as_me:$LINENO: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib64/0@0.so.1" >&5 +$as_echo "$as_me: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib64/0@0.so.1" >&2;} + { (exit 1); exit 1; }; } + elif test "$printf_null_ok" == "no" -a "$have_solaris" == "yes" -a -d /usr/lib/0@0.so.1; then + { { $as_echo "$as_me:$LINENO: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1" >&5 +$as_echo "$as_me: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119 or set LD_PRELOAD=/usr/lib/0@0.so.1" >&2;} + { (exit 1); exit 1; }; } + elif test "$printf_null_ok" == "no" -a "$have_solaris" == "yes"; then + { { $as_echo "$as_me:$LINENO: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119" >&5 +$as_echo "$as_me: error: printf(\"%s\", NULL) results in abort, upgrade to OpenSolaris release 119" >&2;} + { (exit 1); exit 1; }; } + elif test "$printf_null_ok" == "no"; then + { { $as_echo "$as_me:$LINENO: error: printf(\"%s\", NULL) results in abort" >&5 +$as_echo "$as_me: error: printf(\"%s\", NULL) results in abort" >&2;} { (exit 1); exit 1; }; } fi