Skip to content

[Andreas Krause <Andreas.Krause@genedata.com>] Re: splus shell escapes

5 messages · A.J. Rossini, Martin Maechler, Peter Dalgaard +2 more

#
Anyone know what the problem is with IRIX 6.5 ?  (esp if there is a
solution?).  Looks like the built-in math stuff is masking definitions
from R source.

(passing this along for a friend).

best,
-tony



From: Andreas Krause <Andreas.Krause@genedata.com>
To: "A.J. Rossini" <rossini@biostat.washington.edu>
Subject: Re: splus shell escapes


# download
./configure


R is now configured for mips-sgi-irix6.5

  Source directory:         .
  Installation directory:   /usr/local
  C compiler:               gcc -g -O2
  FORTRAN compiler:         f77 

make
make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/afm'
make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/afm'
make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/demos'
make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/demos'
make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/doc'
make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/doc'
make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/etc'
make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/etc'
make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/src'
make[2]: Entering directory `/u/andreas/tmp/R/R-0.63.2/src/include'
make[2]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/src/include'
make[2]: Entering directory `/u/andreas/tmp/R/R-0.63.2/src/appl'
gcc -g -O2 -I../include -I../../src/include  -c fft.c -o fft.o
In file included from fft.c:21:
../include/Mathlib.h:255: conflicting types for `gammal'
/usr/include/math.h:819: previous declaration of `gammal'
make[2]: *** [fft.o] Error 1
make[2]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/src/appl'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/src'
make: *** [R] Error 1

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
tony> Anyone know what the problem is with IRIX 6.5 ?  (esp if there is
    tony> a solution?).  Looks like the built-in math stuff is masking
    tony> definitions from R source.

    tony> (passing this along for a friend).

    ....


    tony> # download
    tony> ./configure


    tony> R is now configured for mips-sgi-irix6.5

    tony> Source directory:         .
    tony> Installation directory:   /usr/local
    tony> C compiler:               gcc -g -O2
    tony> FORTRAN compiler:         f77 

    tony> make

    tony> make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/afm'
    tony> make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/afm'
    tony> make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/demos'
    tony> make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/demos'
    tony> make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/doc'
    tony> make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/doc'
    tony> make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/etc'
    tony> make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/etc'
    tony> make[1]: Entering directory `/u/andreas/tmp/R/R-0.63.2/src'
    tony> make[2]: Entering directory
    tony> `/u/andreas/tmp/R/R-0.63.2/src/include' make[2]: Leaving
    tony> directory `/u/andreas/tmp/R/R-0.63.2/src/include' make[2]:
    tony> Entering directory `/u/andreas/tmp/R/R-0.63.2/src/appl'

    tony> gcc -g -O2 -I../include -I../../src/include  -c fft.c -o fft.o
    tony> In file included from fft.c:21:
    tony> ../include/Mathlib.h:255: conflicting types for `gammal'
    tony> /usr/include/math.h:819: previous declaration of `gammal'

Very funny.  

I wonder if Andreas really used an unaltered 0.63.2
There's no `gammal'  in   src/include/Mathlib.h (nor ./include/Mathlib.h)
especially not on line 255 where there's  qgamma(...)


    tony> make[2]: *** [fft.o] Error 1
    tony> make[2]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/src/appl'
    tony> make[1]: *** [R] Error 1
    tony> make[1]: Leaving directory `/u/andreas/tmp/R/R-0.63.2/src'
    tony> make: *** [R] Error 1
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Martin Maechler <maechler@stat.math.ethz.ch> writes:
We've been having "fun" with *gamma stuff before (conflicts on SunOS,
remember?). It's possible that IRIX has a macro defining qgamma to be
gammal, in which case an "#undef qgamma" in Mathlib.h might do the
trick.
#
Hi.
Peter Dalgaard BSA wrote:

            
The suspicion is right. 
Here is an excerpt from /usr/include/math.h:

extern double   gamma(double);
extern double   lgamma(double); 

...

#if _XOPEN4 && _NO_ANSIMODE
#define qgamma  gammal
#define qlgamma lgammal
#define qsigngam signgaml

extern long double gammal( long double );

extern long double lgammal( long double );
#endif

------------

Modifying src/include/Mathlib.h to

        /* Gamma and Related Functions */

#undef qgamma  

does the job indeed. Thanks, Peter!

...
However, for the sake of completeness, there's another problem on Irix:
f77  -fpic -c bsplvd.f -o bsplvd.o
f77 ERROR parsing -fpic:  unknown flag
make[4]: *** [bsplvd.o] Error 2

Outcommenting in configure 
if test "${CC}" = gcc; then
  cpicflags=-fpic
fi

does the job. Thanks again!


         andreas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Tony> Anyone  know what the  problem is with  IRIX 6.5 ?   (esp if
    Tony> there is  a solution?).  Looks like the  built-in math stuff
    Tony> is masking definitions from R source.

    Tony>   Source directory:  .  Installation directory: /usr/local C
    Tony> compiler: gcc -g -O2 FORTRAN compiler: f77

    Tony>        make        make[1]:        Entering        directory
    Tony>  `/u/andreas/tmp/R/R-0.63.2/afm' make[1]:  Leaving directory
    Tony> `/u/andreas/tmp/R/R-0.63.2/afm'  make[1]: Entering directory
    Tony> `/u/andreas/tmp/R/R-0.63.2/demos' make[1]: Leaving directory
    Tony>    `/u/andreas/tmp/R/R-0.63.2/demos'    make[1]:    Entering
    Tony>  directory `/u/andreas/tmp/R/R-0.63.2/doc'  make[1]: Leaving
    Tony> directory  `/u/andreas/tmp/R/R-0.63.2/doc' make[1]: Entering
    Tony>  directory `/u/andreas/tmp/R/R-0.63.2/etc'  make[1]: Leaving
    Tony> directory  `/u/andreas/tmp/R/R-0.63.2/etc' make[1]: Entering
    Tony> directory  `/u/andreas/tmp/R/R-0.63.2/src' make[2]: Entering
    Tony>  directory  `/u/andreas/tmp/R/R-0.63.2/src/include' make[2]:
    Tony>  Leaving  directory  `/u/andreas/tmp/R/R-0.63.2/src/include'
    Tony>            make[2]:            Entering            directory
    Tony> `/u/andreas/tmp/R/R-0.63.2/src/appl' gcc -g -O2 -I../include
    Tony> -I../../src/include -c fft.c  -o fft.o In file included from
    Tony>  fft.c:21: ../include/Mathlib.h:255:  conflicting  types for
    Tony>  `gammal' /usr/include/math.h:819:  previous  declaration of
    Tony>  `gammal'  make[2]: ***  [fft.o]  Error  1 make[2]:  Leaving
    Tony> directory  `/u/andreas/tmp/R/R-0.63.2/src/appl' make[1]: ***
    Tony>     [R]    Error     1     make[1]:    Leaving     directory
    Tony> `/u/andreas/tmp/R/R-0.63.2/src' make: *** [R] Error 1

Ah! This is one I have run into. 

SGI has  its own  version of  the log-gamma in  the math  library that
causes  a  number of  problems  with  dynamic  loading including  with
xlispstat. One easy way to get  around this is to #ifdef the part that
defines gammal in the R includes to tide things over.

I  once  had  an  exchange  with  Luke about  this  situation  on  the
SGI. Which is why xls defines it log gamma function to be mygamma! 

________________________________________________________________
B. Narasimhan                            naras@stat.stanford.edu
                             http://www-stat.stanford.edu/~naras





-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._