From: SourceForge.net <no...@so...> - 2009-01-05 21:59:09
|
Bugs item #1839067, was opened at 2007-11-26 16:44 Message generated for change (Comment added) made by gsyoungblood You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1839067&group_id=10894 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: 48. Number Handling Group: obsolete: 8.5b3 Status: Open Resolution: Fixed Priority: 9 Private: No Submitted By: Michael Schlenker (mic42) Assigned to: Kevin B KENNY (kennykb) Summary: fp rounding setup on opensolaris x86 Initial Comment: Testing the 8.5.0 RC0 on opensolaris (SunOS 5.11 svn_55b x86) showed 126 test failures in expr 28.xxx, mostly off by ones when compiled with the SunStudio 11 compiler. kbk suggested to look at: http://developers.sun.com/sunstudio/documentation/ss10_docs/mr/man3m/ieee_flags.3m.html After manually patching tclStrToD in the appropriate places where the gcc macros are usually used with: #include <sunmath.h> ieee_flags("set","precision","double",NULL); ieee_flags("clear","precsion",NULL,NULL); and adding -lsunmath in front of -lm in the link line the errors disappear. ---------------------------------------------------------------------- Comment By: Gregory Youngblood (gsyoungblood) Date: 2009-01-05 14:59 Message: Ran into what I believe is a related problem when attempting to compile using Sun Studio Express 2008-11 on Solaris 10u6 32-bit Intel. Compiling would fail with undefined symbol ieee_flags in libtcl8.5.so. Further digging revealed that the check whether or not to use -lsunmath for fp rounding control was returning negative, causing -lsunmath not to be added to MATH_LIBS. The problem appeared to be the use of a list (amd64 i386) when testing arch. Changing it to test each arch individually appeared to resolve the problem. Assuming this is correct, there's a similar test for sparc (sparcv9 sparc) that may need tweaking too. The following patch allows it to compile: diff -bur tcl8.5.6/unix/configure tcl8.5.6-solaris/unix/configure --- tcl8.5.6/unix/configure Mon Dec 22 07:16:08 2008 +++ tcl8.5.6-solaris/unix/configure Mon Jan 5 14:36:32 2009 @@ -8417,7 +8417,7 @@ else - if test "$arch" = "amd64 i386"; then + if test "$arch" = "amd64" -o "$arch" = "i386" ; then if test "$GCC" = yes; then @@ -8468,7 +8468,7 @@ arch=`isainfo` echo "$as_me:$LINENO: checking whether to use -lsunmath for fp rounding control" >&5 echo $ECHO_N "checking whether to use -lsunmath for fp rounding control... $ECHO_C" >&6 - if test "$arch" = "amd64 i386"; then + if test "$arch" = "amd64" -o "$arch" = "i386" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 @@ -8651,7 +8651,7 @@ #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" else - if test "$arch" = "amd64 i386"; then + if test "$arch" = "amd64" -o "$arch" = "i386" ; then SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" diff -bur tcl8.5.6/unix/tcl.m4 tcl8.5.6-solaris/unix/tcl.m4 --- tcl8.5.6/unix/tcl.m4 Mon Dec 22 07:16:08 2008 +++ tcl8.5.6-solaris/unix/tcl.m4 Mon Jan 5 14:35:08 2009 @@ -1916,7 +1916,7 @@ # Solaris 64 uses this as well #LD_LIBRARY_PATH_VAR="LD_LIBRARY_PATH_64" ]) - ], [AS_IF([test "$arch" = "amd64 i386"], [ + ], [AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [ AS_IF([test "$GCC" = yes], [ case $system in SunOS-5.1[[1-9]]*|SunOS-5.[[2-9]][[0-9]]*) @@ -1947,7 +1947,7 @@ AS_IF([test "$GCC" = yes],[use_sunmath=no],[ arch=`isainfo` AC_MSG_CHECKING([whether to use -lsunmath for fp rounding control]) - AS_IF([test "$arch" = "amd64 i386"], [ + AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [ AC_MSG_RESULT([yes]) MATH_LIBS="-lsunmath $MATH_LIBS" AC_CHECK_HEADER(sunmath.h) @@ -1978,7 +1978,7 @@ # path, remove so name and append 'sparcv9' #v9gcclibdir="`gcc -print-file-name=libgcc_s.so` | ..." #CC_SEARCH_FLAGS="${CC_SEARCH_FLAGS},-R,$v9gcclibdir" - ], [AS_IF([test "$arch" = "amd64 i386"], [ + ], [AS_IF([test "$arch" = "amd64" -o "$arch" = "i386"], [ SHLIB_LD="$SHLIB_LD -m64 -static-libgcc" ])]) ]) ---------------------------------------------------------------------- Comment By: Jeffrey Hobbs (hobbs) Date: 2008-08-15 10:50 Message: Logged In: YES user_id=72656 Originator: NO We have recently discovered another issue with the sunmath fix for solaris-x86 - libsunmath only comes with Sun's Forte and isn't standard on default solaris-x86 machines. We are currently having to work around this. ---------------------------------------------------------------------- Comment By: Don Porter (dgp) Date: 2008-08-15 07:17 Message: Logged In: YES user_id=80530 Originator: NO Had the chance to do some testing on an IRIX64 6.5 system with the MIPSpro 7.4.4m compiler, and it exhibits similar troubles in the form of 23 failing tests in binary.test and expr.test, mostly differences in the LSB in underflow scenarios. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2008-04-01 13:13 Message: Logged In: YES user_id=75003 Originator: NO Patch applied to head and core-8-5-branch. ---------------------------------------------------------------------- Comment By: Michael Schlenker (mic42) Date: 2008-04-01 12:47 Message: Logged In: YES user_id=302287 Originator: YES Verified your updated patch with my x86 VM and the sun CC, works fine and as expected. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2008-04-01 11:02 Message: Logged In: YES user_id=75003 Originator: NO I have updated the attached patch to the Tcl 8.5 head, should work for Tcl head (8.6) as well. In tcl.m4 mostly location differences, and making one rejected chunk viable to due to conflict with other changes made in the meantime. In tclStrToD.c I had to add "&& !defined(__GNUC__)" to the ifdeffery of three uses of ieee_flags. These missing exposed ieee_flags to a gcc build on a solaris 2.10 amd64 box, causing link failure. Michael, please check that the updated patch still works for you. ---------------------------------------------------------------------- Comment By: Andreas Kupries (andreas_kupries) Date: 2008-04-01 10:59 Message: Logged In: YES user_id=75003 Originator: NO File Added: sunmath-updated.diff ---------------------------------------------------------------------- Comment By: Kevin B KENNY (kennykb) Date: 2008-03-29 22:02 Message: Logged In: YES user_id=99768 Originator: NO I don't have a Solaris-x86 to test on, but the patch looks right. Jeff, could I trouble you or Andreas to apply the patch, make test, and commit if everything works? Thanks. ---------------------------------------------------------------------- Comment By: Michael Schlenker (mic42) Date: 2008-03-18 17:01 Message: Logged In: YES user_id=302287 Originator: YES The errors in expr dissapear when linking with sunmath (which requires -z textoff to the linker, otherwise LD barfs) and applying a small fix to tclStrToD.c. The attached patch works on opensolaris. Would be good if someone with a regular solaris setup on x86 and sparc could check if the patch doesn't break something. File Added: sunmath.diff ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=1839067&group_id=10894 |