This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gsl 0.8 compile error



I don't know about OpenBSD, but:

For some NetBSD platforms there are two math libraries, the portable C
one, and an Assembly routine library.

For i386 you have libm and libm387, and if /etc/ld.so.conf contains

libm.so.0	machdep.fpu_present	1:libm387.so.0,libm.so.0

then libm387 will be used in place of the C version.

Perhaps you need to remove a similar line from your ld.so.conf to
use the C version.

The C version passes all GSL tests on i386, but GSL fails the same
tests as on OpenBSD with the Assembly stuff. I only tested GSL with
the portable C version, so only after this discussion have I noticed
the problem.

I'll report it as a NetBSD bug.

Regards,

Jason Beegan


PS.  Now might be a good time to simplify fp-netbsd.c.  Please apply
this diff.


--- fp-netbsd.c~	Mon Jun 25 21:08:39 2001
+++ fp-netbsd.c	Mon Jun 25 21:10:27 2001
@@ -18,7 +18,6 @@
  */
 
 #include <ieeefp.h>
-#include <sys/param.h>
 #include <gsl/gsl_ieee_utils.h>
 #include <gsl/gsl_errno.h>
 
@@ -68,12 +67,13 @@
     }
 
 /* Turn on all available exceptions apart from 'inexact'.
-   Denormalized operand exception not available on all ports. */
+   Denormalized operand exception not available on all platforms. */
 
+  mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL;
 #ifdef FP_X_DNML
-  mode = FP_X_INV | FP_X_DNML | FP_X_DZ | FP_X_OFL | FP_X_UFL;
+  mode = mode | FP_X_DNML
 #else
-  mode = FP_X_INV | FP_X_DZ | FP_X_OFL | FP_X_UFL;
+
 #endif
 
   if (exception_mask & GSL_IEEE_MASK_INVALID)
@@ -83,7 +83,7 @@
 #ifdef FP_X_DNML
     mode &= ~ FP_X_DNML;
 #else
-  GSL_ERROR ("netbsd-" MACHINE " does not support the denormalized operand exception. "
+  GSL_ERROR ("NetBSD does not support the denormalized operand exception on this platform. "
 	     "Use 'mask-denormalized' to work around this.",
 	     GSL_EUNSUP);
 #endif





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]