[R] trouble compiling Hmisc package
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Jul 14 12:59:34 CEST 2007
On Fri, 13 Jul 2007, colton.smith at skio.usg.edu wrote:
> Hi:
>
> We're trying to install the Hmisc package on a Solaris 9 machine.
But Solaris 9 does not come with a compiler called 'g95', as far as I
know. So what is this?
The underlying problem is that Hmisc is not written in standard Fortran.
DO ... END DO statements are not Fortran77 and in Fortran 2003 I believe
they are required to have integer loop indices. But most compilers cope,
including the Solaris 'standard' f95. Your first port of call (see the R
posting guide) is the package maintainer, Cc:ed here.
Charles: the use of REAL*8 and INTEGER*4 is both non-standard and not what
R has tested when being built. Please use DOUBLE PRECSION and INTEGER.
And tabs are not valid: use spaces.
A quick fix is likely to be to declare
INTEGER xl,xr,yl,yu
in largrec.f.
> Here's what we get:
>
> R CMD INSTALL /usr/local/srctree/Hmisc_3.4-2.tar.gz
> * Installing to library '/usr/local/lib/R/library'
> * Installing *source* package 'Hmisc' ...
> ** libs
> g95 -fPIC -g -O2 -c cidxcn.f -o cidxcn.o
> g95 -fPIC -g -O2 -c cidxcp.f -o cidxcp.o
> g95 -fPIC -g -O2 -c hoeffd.f -o hoeffd.o
> g95 -fPIC -g -O2 -c jacklins.f -o jacklins.o
> g95 -fPIC -g -O2 -c largrec.f -o largrec.o
> In file largrec.f:27
>
> DO xl=xlim(1),xlim(2)-width,xinc
> 1
> Error: Loop variable at (1) must be a scalar INTEGER
> In file largrec.f:28
>
> DO yl=ylim(1),ylim(2)-height,yinc
> 1
> Error: Loop variable at (1) must be a scalar INTEGER
> In file largrec.f:29
>
> DO xr=xl+width,xlim(2),xinc
> 1
> Error: Loop variable at (1) must be a scalar INTEGER
> In file largrec.f:30
>
> DO yu=yl+height,ylim(2),yinc
> 1
> Error: Loop variable at (1) must be a scalar INTEGER
> make: *** [largrec.o] Error 1
> ERROR: compilation failed for package 'Hmisc'
> ** Removing '/usr/local/lib/R/library/Hmisc'
>
> Can anybody help us?
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list