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

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Oct 28 04:54:01 EDT 2004


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

-- 
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 grass-stats mailing list