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

Roger Bivand Roger.Bivand at nhh.no
Fri Oct 29 14:09:12 EDT 2004


Paul,

I have put a draft GRASS package on:

http://spatial.nhh.no/R/GRASS/GRASS_0.2-21.tar.gz

Could you please try it and see whether the immediate solution of only 
including the XDR and zlib headers on Windows (versions matching the R 
2.0.0 release) but not on other platforms addresses your problem?

Roger


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

> On Thu, 28 Oct 2004, Roger Bivand wrote:
> 
> > (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.*.
> 
> I'm sorry, but that is not what is happening here.  The GRASS package is
> not linked against anything other than R and so the xdr functions used are
> found from the OS library (usually libc), or from R.dll on Windows.  So
> you do need the headers from the OS, if it has them, otherwise those from
> the R sources.  In practice I suspect all platforms R runs on have xdr
> other than Windows.  Concrete evidence:
> 
> gannet% nm -pg GRASS.so | grep xdr
>          U xdrmem_create@@GLIBC_2.0
>          U xdr_double@@GLIBC_2.0
>          U xdr_float@@GLIBC_2.0
> 
> My suggestion to delete the rpc/xdr headers is likely to work everywhere 
> but on Windows.
> 
> As for zlib, 
> 
> gannet% nm -pg GRASS.so | grep flate
>          U deflate
>          U inflate
>          U inflateInit_
>          U deflateInit_
>          U inflateEnd
>          U deflateEnd
> 
> so you are linking against the libz in R and you *do* have version
> mismatch, of a 1.1.4 header used with libz 1.2.1 (which is what R
> contains).  Fortunately that is unlikely to be a problem.
> 
> With an external GRASS library there is even more room for mismatches.
> 
> 
> Brian
> 
> 

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