[R] R 68.3 on OSF V4.0 problems

Paul Szabo psz at maths.usyd.edu.au
Fri Mar 12 01:07:44 CET 1999


I am trying to install R-0.63.3 on a Digital Alpha running OSF V4.0D, and
having some difficulties. Can anyone help?

Also, I found some "oddities" in the installation process. I expect that
this message is read by the developers, maybe some of my suggestions can be
incorporated into future releases.

Please reply to me directly (as well as possibly also to this mailing list):
I am not a recipient of the list.


My problem is that floating-point operations seem weird. If I 'make' the
package as instructed, R quits (right after the welcome messages) with a
"floating exception"; if I change things so as not to use IEEE_754 (whatever
that means, and however 'configure' decided to use it), then the treatment
of 0/0 and the like (NaN, Inf) seems weird. Should not 'configure' pick the
correct options for my machine, and should not R recognize NaN and Inf?


The "oddities" of the build and installation process are:

Need cc (or ld?), not f77 for linking in src/main/Makefile (f77 has a nasty
habit of linking crt0.o or whatever).

Small bug in src/unix/Makefile causes needless re-makes.

Scripts COMPILE, INSTALL and SHLIB in src/scripts must use gmake, not the
DEC make (or I get the 'unknown option w' error).

The DEC shell /bin/sh has a weird (wrong?) treatment of "${@}", use ksh in
the main bin/R script.

For the installation, I like to keep things in the one directory, with
symlinks from /usr/local/bin and similar places. This allows easier
maintenance: I can build and install new versions as a non-root user. Root
does not need to run an "untrusted" makefile, but has only to create a few
symlinks. (I am root on my machines, but...)


Below is the shell script I used to build R so you can see exactly what I
done.


Thanks in advance for any help with my problem.

Paul Szabo - System Manager   //        School of Mathematics and Statistics
psz at maths.usyd.edu.au         //   University of Sydney, NSW 2006, Australia


---

#!/bin/ksh -

set -x

V=R-0.63.3
gzcat $V.tgz | tar xf -
cd $V

rm -f config.cache
./configure


: 'Versions (for the record):'
: '% uname -a'
: 'OSF1 turin.maths.usyd.edu.au V4.0 878 alpha'
: '% sizer -v '
: 'Digital UNIX V4.0D  (Rev. 878); Tue Dec 15 07:43:31 EST 1998 '
: '% gcc -v'
: 'gcc version 2.8.1'

: 'The PLATFORMS file suggests to use the gcc option -mieee-with-inexact'
perl -i.bak -pe 's/-ieee_with_inexact/-mieee-with-inexact/' Makeconf etc/Makeconf

: 'Fix some bugs:'

: 'Do not use IEEE_754: would get "Floating exception" in'
: 'line 288 of file src/main/relop.c : "x2 = REAL(s2)[i % n2];".'
: 'With old gcc (without -mieee-with-inexact option), the error was in'
: 'line 131 of file src/main/arithmetic.c : "R_NaN = 0.0/R_Zero_Hack;".'
: 'Note that without IEEE_754, I get -1.797693e+308 for both 0/0 and 1/0.'
perl -i.bak -pe 's/#define IEEE_754/#undef IEEE_754/' src/include/Platform.h

: 'Need non-IEEE754 routine R_IsNA (wonder if it is correct...)'
perl -i.bak -pe 's/^(.*Arithmetic )(Initialization.*)$/int R_IsNA(double x) { return (x != x); }\n\n$1zz $2/' src/main/arithmetic.c

: 'Use cc, not f77, for linking (otherwise get "main multiply defined")'
perl -i.bak -pe 's/..LDCMD./cc/' src/main/Makefile

: 'No dependency: only remake when needed'
perl -i.bak -pe 's/::$/:/' src/unix/Makefile

: 'Use gmake, not make'
perl -i.bak -pe 's/MAKE-make/MAKE-gmake/' src/scripts/COMPILE src/scripts/INSTALL src/scripts/SHLIB

: 'Get rid of pesky "ARGUMENT '"''"' __ignored__" message'
perl -i.bak -pe 's:/bin/sh:/bin/ksh:' src/scripts/R.sh

: 'Install man pages in RHOME, with symlinks from /usr/local/man/man1'
perl -i.bak -pe 's/mandir/rhome/ unless m/cd/; s/^\t.(.cd ..mandir)/\t-$1/; print "\t  for f in R.1 Rdconv.1; do rm -f \$\$f; \$(LN_S) \$(rhome)/man1/\$\$f \$\$f; done; \\\n" if m/in Rd2txt/' doc/Makefile

: 'Install with symlinks from /usr/local/bin'
perl -i.bak -pe 's:^.*cat .* ..bindir./R$:\techo Not doing /usr/local/bin/R yet:; s: ..bindir./R : : if m/chmod/; s/^.*(for f in )(Rd2txt )/\t-$1R $2/; s:^(.*)..INSTALL. (.*) (..bindir.):$1\$(LN_S) \$(rhome)/$2 $3:;' Makefile


gmake

: 'To install the lot, need to do as root:
  mkdir /usr/local/lib/R
  chown psz /usr/local/lib/R
On the machine with /usr/local do (as psz):
  gmake install
and finally again as root:
  chown -R bin.bin /usr/local/lib/R
  chmod -R go=rX /usr/local/lib/R
  ln -s /usr/local/lib/R/man1/R.1      /usr/local/man/man1
  ln -s /usr/local/lib/R/man1/Rdconv.1 /usr/local/man/man1
  ln -s Rdconv.1 /usr/local/man/man1/Rd2txt.1
  ln -s Rdconv.1 /usr/local/man/man1/Rdindex.1
  ln -s Rdconv.1 /usr/local/man/man1/Sd2Rd.1
  ln -s /usr/local/lib/R/bin/R         /usr/local/bin
  ln -s /usr/local/lib/R/bin/Rd2txt    /usr/local/bin
  ln -s /usr/local/lib/R/bin/Rdconv    /usr/local/bin
  ln -s /usr/local/lib/R/bin/Rdindex   /usr/local/bin
  ln -s /usr/local/lib/R/bin/Sd2Rd     /usr/local/bin
'
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list