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]

AIX 4.3.3


So; new departmental machine with AIX 4.3.3 on it. Trying to install
gsl; with success, finally.

Compiler is "C for AIX" (ie *not* xlc which is used on aix < 4.3.0);
make is AIX make; both are whichever version comes as standard with
4.3.3. gsl is as pulled from cvs yesterday.

First problem is ANSI compliance; this compiler seems to think
that large parts of gsl are not compliant; specifically it is unhappy
with functions returning const qualified types; which are all over 
the place in the vector & matrix subdirectories. 

I don't know the ANSI standard well enough to know if this is allowed
or not; bit I would note that gsl doesn't compile under "gcc -ansi"
on linux at the moment, albeit it fails with a different error.

So; I have to use the normal cc to compile gsl; except for
test/results.c, which needs to be compiled with c89 (which
is cc plus ansi-compliance flags) in order to get proper
definitions for va_start and va_end, so a bit of Makefile
editing is required.

Furthermore, ieee-utils/fp-aix.c is wrong (at least for this version of AIX)

--- fp-aix.c.old        Thu Sep 28 14:51:06 2000
+++ fp-aix.c    Thu Sep 28 14:52:40 2000
@@ -17,7 +17,6 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <math.h>
 #include <fptrap.h>
 #include <float.h>
 #include <gsl/gsl_ieee_utils.h>
@@ -74,10 +73,10 @@
 
   /* Turn on all the exceptions apart from 'inexact' */
 
-  mode = TRAP_INVALID | TRAP_DIV_BY_ZERO | TRAP_OVERFLOW | TRAP_UNDERFLOW ;
+  mode = TRP_INVALID | TRP_DIV_BY_ZERO | TRP_OVERFLOW | TRP_UNDERFLOW ;
 
   if (exception_mask & GSL_IEEE_MASK_INVALID)
-    mode &= ~ TRAP_INVALID ;
+    mode &= ~ TRP_INVALID ;
 
   if (exception_mask & GSL_IEEE_MASK_DENORMALIZED)
     GSL_ERROR ("AIX does not support the denormalized operand exception. "
@@ -85,21 +84,21 @@
               GSL_EUNSUP) ;
 
   if (exception_mask & GSL_IEEE_MASK_DIVISION_BY_ZERO)
-    mode &= ~ TRAP_DIV_BY_ZERO ;
+    mode &= ~ TRP_DIV_BY_ZERO ;
 
   if (exception_mask & GSL_IEEE_MASK_OVERFLOW)
-    mode &= ~ TRAP_OVERFLOW ;
+    mode &= ~ TRP_OVERFLOW ;
 
   if (exception_mask & GSL_IEEE_MASK_UNDERFLOW)
-    mode &=  ~ TRAP_UNDERFLOW ;
+    mode &=  ~ TRP_UNDERFLOW ;
 
   if (exception_mask & GSL_IEEE_TRAP_INEXACT)
     {
-      mode |= TRAP_INEXACT ;
+      mode |= TRP_INEXACT ;
     }
   else
     {
-      mode &= ~ TRAP_INEXACT ;
+      mode &= ~ TRP_INEXACT ;
     }
 
   /* AIX appears to require two steps -- first enable floating point traps



Also; the compiler (ansi or not) objects to integral consts being used 
for defining static arrays; this means that two files need changed:

--- multifit/demo.c.old  Thu Sep 28 18:13:11 2000
+++ multifit/demo.c      Thu Sep 28 18:13:24 2000
@@ -83,7 +83,7 @@
   gsl_vector *g = gsl_vector_calloc (p);
   gsl_matrix *covar = gsl_matrix_alloc (p, p);
 
-  double y[n], sigma[n];
+  double y[40], sigma[40];
 
--- qrng/niederreiter-2.c.old        Thu Sep 28 18:01:21 2000
+++ qrng/niederreiter-2.c    Thu Sep 28 18:01:07 2000
@@ -219,7 +219,7 @@
   const int MAXV = NIED2_NBITS + NIED2_MAX_DEGREE;
 
   int ci[NIED2_NBITS][NIED2_NBITS];
-  int v[MAXV+1];
+  int v[NIED2_NBITS+NIED2_MAX_DEGREE+1];
   int r;
   int i_dim;
   struct data d = { n, y, sigma};


 
And finally, for reasons best known to itself, the compiler
treats inlined functions in a somewhat bizarre manner such that
it forgets about them when the object files are ar'd into a *.al
file; thus the following change

--- hypot.c.old Thu Sep 28 16:44:13 2000
+++ hypot.c     Thu Sep 28 16:43:48 2000
@@ -20,9 +20,9 @@
 #include <config.h>
 #include <math.h>
 
-inline double gsl_hypot (const double x, const double y);
+double gsl_hypot (const double x, const double y);
 
-inline double gsl_hypot (const double x, const double y)
+double gsl_hypot (const double x, const double y)
 {
   double xabs = fabs(x) ;
   double yabs = fabs(y) ;



So; all of the above being done, gsl compiles, despite throwing 
up hundreds of warnings (but not errors if we don't switch ansi
compliance on) about "Function cannot return a const qualified type", 
and about *.la and *.lo files having incorrect suffixes. Also several
warnings of duplicate symbols.
ld: 0711-224 WARNING: Duplicate symbol: p_xargc
ld: 0711-224 WARNING: Duplicate symbol: p_xargv
ld: 0711-224 WARNING: Duplicate symbol: .sqrt
ld: 0711-224 WARNING: Duplicate symbol: guesses
ld: 0711-224 WARNING: Duplicate symbol: p_xrcfg
ld: 0711-224 WARNING: Duplicate symbol: p_xrc
But these seem not to matter.


So; make check:

Most sub-directories pass, with a couple of caveats:
1)specfunc fails in several places:
FAIL:   gsl_sf_lnbeta_impl(0.1, 0.1, &r)
FAIL:   gsl_sf_lnbeta_impl(0.1, 1.0, &r)
FAIL: Gamma Functions
FAIL:   gsl_sf_hyperg_1F1_int_impl(100, 400, 100.0, &r)
FAIL:   gsl_sf_hyperg_U_int_impl(-90, 1, 10, &r)
FAIL:   gsl_sf_hyperg_U_int_impl(-90, 10, 10, &r)
FAIL:   gsl_sf_hyperg_U_impl(1, 1.2, 2.0, &r)
FAIL:   gsl_sf_hyperg_U_impl(-50.5, 100.1, 40, &r)
FAIL:   gsl_sf_hyperg_2F1_conj_impl(25, 25, 1, -0.5, &r)
FAIL:   gsl_sf_hyperg_2F1_conj_renorm_impl(9, 9, -1.5, -0.99, &r)
FAIL: Hypergeometric Functions
FAIL:   gsl_sf_laguerre_n_impl(90, 2.0, 100.0, &r)
FAIL: Laguerre Polynomials
FAIL:   gsl_sf_conicalP_0_impl(0.0, 2.0, &r)
FAIL:   gsl_sf_conicalP_0_impl(0.0, 100.0, &r)
FAIL:   gsl_sf_conicalP_1_impl(0.0, 0.5, &r)
FAIL:   gsl_sf_conicalP_1_impl(0.0, 2.0, &r)
FAIL:   gsl_sf_conicalP_1_impl(0.0, 100.0, &r)
FAIL: Legendre Functions
FAIL:   gsl_sf_synchrotron_2_impl(0.01, &r)
FAIL: Synchrotron Functions

(Details are in the makecheck.aix file I've mentioned below. They all
look like they're just outwith the tolerance limits.)

2) monte fails as previously noted by others.

3) block, vector & matrix all pass, but compiling the tests generates a 
lot of warnings of the type
"test_complex_source.c", line 129.17: 1506-411 (E) An array that is not an lvalue cannot be subscripted.

I've put the full output from make check at 
<URL:http://ket.ch.cam.ac.uk/people/tow/makecheck.aix>

I appreciate that most of the problems are due to the foibles of
this particular compiler, and I'm aware that the fixes in the 
provided diffs are not ideal. However, the libraries now work
for me. So I'm happy.

Toby White
 
-- 
Toby White, University Chemical Lab., Lensfield Road, Cambridge. CB2 1EW. U.K.
<tow@theor.ch.cam.ac.uk> for archival and encrypted mail. GPG Key ID: 1DE9DE75
<toby.white@vodafone.net> for immediate attention.
Web: http://ket.ch.cam.ac.uk/people/tow/index.html
Tel: +44 1223 336423
Fax: +44 7747 609139


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