From Thomas Vogels <tov@ece.cmu.edu>  Fri Jun  8 21:37:57 2001
From: Thomas Vogels <tov@ece.cmu.edu> (Thomas Vogels)
Date: 08 Jun 2001 16:37:57 -0400
Subject: [Rd] AIX & R-devel
In-Reply-To: Kurt Hornik's message of "Fri, 8 Jun 2001 09:40:56 +0200"
References: <Pine.A41.4.33.0106071439180.48906-100000@homer17.u.washington.edu>
 <15136.33160.113901.243854@mithrandir.hornik.net>
Message-ID: <px7kymlnbu.fsf@infiniti.ece.cmu.edu>


Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at> writes:

> >>>>> Thomas Lumley writes:
> 
> > The AIX build of the development version isn't quite working due to a
> > problem in the automatic symbol extraction process.
> 
> > Compilation of R itself goes fine, but then in the script tools/ldAIX4
> > doesn't extract the symbols from arithmetic.o.  This is because
> >   bash-2.01$ nm arithmetic.o
> >   nm: arithmetic.o: 0654-206 Cannot process the symbol table.
> 
> > As a result, R_finite is not exported and the vfonts module cannot be
> > built.  If the necessary symbols are added by hand to etc/R.exp then the
> > rest of the build proceeds normally.
> 
> > Compiling arithmetic.c doesn't produce any errors (gcc) and the symbol
> > table problem doesn't seem to happen for any other object file.
> 
> > Any ideas?

yes.  What changed from r-release to r-devel is how the endianness
flags, hw and lw, are handled.  Get rid of the const or the static
keyword, and arithmetic.c compiles and nm can read the symbol table.
Looks like a compiler/assembler bug to me...

Suggestion until 'static const int' works in AIX: Change around line 87:

#ifndef _AIX
#  ifdef WORDS_BIGENDIAN
static const int hw = 0;
static const int  lw = 1;
#  else  /* WORDS_BIGENDIAN */
static const int hw = 1;
static const int lw = 0;
#  endif /* WORDS_BIGENDIAN */
#else
        /* 'static const int' doesn't work on AIX */
#  ifdef WORDS_BIGENDIAN
static int hw = 0;
static int  lw = 1;
#  else  /* WORDS_BIGENDIAN */
static int hw = 1;
static int lw = 0;
#  endif /* WORDS_BIGENDIAN */
#endif

Above compiles, links, etc. for me with r-devel from today.


> Not really.  Which nm is that, the native one or from GNU binutils?

I had the problems with the native one.  I don't have the GNU binutils
installed.  


  -tom


> 
> -k
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
mailto:tov@ece.cmu.edu (Tom Vogels)   Tel: (412) 268-6638   FAX: -3204
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] AIX & R-devel
Thomas Vogels