[STATSGRASS] Re: [R] Problems installing GRASS package

Roger Bivand Roger.Bivand at nhh.no
Thu Oct 28 04:12:14 EDT 2004


(Transferred from R-help: does anyone have a working R-GRASS interface on 
Free-BSD? - see further down for Paul English's compile problem (replies 
please also directly to Paul who is almost certainly not subscribed):)

On Thu, 28 Oct 2004, Prof Brian Ripley wrote:

> Please send such problems, with solution, to the package maintainers.
> 
> They do not occur generally and seem to be due to the system headers on 
> your particular system.  Only users of `FreeBSd' will be able to 
> troubleshoot, i.e. you.

I am willing to try to help with this - it is an unusual case and the 
first reported - there is a mailing list from the GRASS side where there 
may be more experience:

http://grass.itc.it/mailman/listinfo/statsgrass

> 
> In this particular case, I think the package needs to use its own headers
> only if the system ones are not available (via a configure test), and
> suggest you try deleting GRASS/src/include/rpc.  (Roger: the zlib.h and
> zconf.h are also worrying, as they might mismatch the libz used.)
> 

This is a very valid concern, and one that the GRASS transition from 5.0.*
stable to 5.4.* stable due in the near future will make relevant - the
current included GRASS code is directly copied from 5.0.*. It is very
likely that the GRASS package (the R-GRASS interface) will return to
linking against external libraries rather than contain a local (aging)
copy of the GRASS library source code, and it is this that links to zlib
and the XDR headers. I am obliged to balance these concerns with what
GRASS users with production systems find necessary; when the code looks
ugly, I'm afraid there were practical reasons for the choices. I'll try to
get things in better shape for GRASS 5.4.* and its successor GRASS 5.7.*.

Roger


> On Wed, 27 Oct 2004, Paul English wrote:
> 
> > 
> > Hi,
> > 	I'm running R 2.0 installed from the source port on FreeBSd 4.10
> 
> There is no R 2.0 and no `source port'.  There are sources of R 2.0.0.
> 
> > and I'm having trouble installing the GRASS package. Following is the
> > procedure plus errors:
> > 
> > > options(CRAN="http://cran.us.r-project.org")
> > > install.packages("GRASS")
> > <download snipped>
> > downloaded 186Kb
> > 
> > * Installing *source* package 'GRASS' ...
> > ** libs
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c R_G_init.c -o
> > R_G_init.o
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c adj_cellhd.c -o
> > adj_cellhd.o
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c alloc.c -o alloc.o
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c alloc_cell.c -o
> > alloc_cell.o
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c ascii_chk.c -o
> > ascii_chk.o
> > cc -I/usr/local/lib/R/include -DR_GRASS_INTERFACE -I./include
> > -I/usr/local/include -mieee-fp  -fPIC  -O -pipe -c auto_mask.c -o
> > auto_mask.o
> > In file included from include/G.h:3,
> >                  from auto_mask.c:18:
> > include/rpc/types.h:87: redefinition of `caddr_t'
> > /usr/include/sys/types.h:69: `caddr_t' previously declared here
> > include/rpc/types.h:89: redefinition of `u_int'
> > /usr/include/sys/types.h:54: `u_int' previously declared here
> > include/rpc/types.h:90: redefinition of `u_long'
> > /usr/include/sys/types.h:55: `u_long' previously declared here
> > include/rpc/types.h:91: redefinition of `u_short'
> > /usr/include/sys/types.h:53: `u_short' previously declared here
> > *** Error code 1
> > 
> > Stop in /tmp/R.INSTALL.35187/GRASS/src.
> > ERROR: compilation failed for package 'GRASS'
> > ** Removing '/usr/local/lib/R/library/GRASS'
> > ** Restoring previous '/usr/local/lib/R/library/GRASS'
> > 
> > Delete downloaded files (y/N)?
> > The packages are in /tmp/RtmpaUoyEh/Rinstdir446b9b3d
> > Warning message:
> > Installation of package GRASS had non-zero exit status in:
> > install.packages("GRASS")
> > 
> > Thanks,
> > Paul
> > 
> > ______________________________________________
> > 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
> > 
> > 
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no





More information about the grass-stats mailing list