[GRASS-user] HDF5 library conflict between R 2.4 and GRASS 6.2:

,

Greetings:

When using R within GRASS6, and loading the rgdal library, I encounter an error
loading a specific version of the HDF5 library that does not occur when I perform
the same operation in R 'outside' of GRASS6:

Here is a record of the error on my ubuntu system:
---------- Start ---------
reeves@wallace:~$ grass2
Cleaning up temporary files.....
Starting GRASS ...

Welcome to GRASS 6.2.1 (2006)
GRASS homepage: http://grass.itc.it/
This version running thru: Bash Shell (/bin/bash)
Help is available with the command: g.manual -i
See the licence terms with: g.version -c
If required, restart the graphical user interface with: gis.m &
When ready to quit enter: exit
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

GRASS 6.2.1 (spearfish60):~ > R

R version 2.4.1 (2006-12-18)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for dGRASS 6.2.1 (spearfish60):~ > R

R version 2.4.1 (2006-12-18)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> library("rgdal")
Loading required package: sp
Error in dyn.load(x, as.logical(local), as.logical(now)) :
       unable to load shared library '/usr/local/lib/R/site-library/rgdal/libs/rgdal.so':
libhdf5-1.6.4.so.0: cannot open shared object file: No such file or directory
Error: package/namespace load failed for 'rgdal'
>
istribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> library("rgdal")
Loading required package: sp
Error in dyn.load(x, as.logical(local), as.logical(now)) :
       unable to load shared library '/usr/local/lib/R/site-library/rgdal/libs/rgdal.so':
libhdf5-1.6.4.so.0: cannot open shared object file: No such file or directory
Error: package/namespace load failed for 'rgdal'
>
------------------------- Trying the same thing Outside of GRASS ------------------------------

reeves@wallace:/usr$ R

R version 2.4.1 (2006-12-18)
Copyright (C) 2006 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library("rgdal")
Loading required package: sp
Geospatial Data Abstraction Library extensions to R successfully loaded
>

---------- End ---------

Would anyone have any suggestions?
I tried to find the 'missing' hdf5 library: libhdf5-1.6.4.so.0: in the archives, to no avail.

Thanks, Rick Reeves

--
Rick Reeves
Scientific Programmer / Analyst
National Center for Ecological Analysis and Synthesis
UC Santa Barbara
reeves@nceas.ucsb.edu
www.nceas.ucsb.edu
805 892 2533

[starting R's rgral package from within GRASS fails, outside of GRASS
it's ok]

Rick Reeves wrote:
> library("rgdal")
Loading required package: sp
Error in dyn.load(x, as.logical(local), as.logical(now)) :
       unable to load shared library
'/usr/local/lib/R/site-library/rgdal/libs/rgdal.so':
libhdf5-1.6.4.so.0: cannot open shared object file: No such file or
directory
Error: package/namespace load failed for 'rgdal'
..

I tried to find the 'missing' hdf5 library: libhdf5-1.6.4.so.0: in the
archives, to no avail.

does ubuntu have an apt-file package? If it does, you can use that tool
to
find the missing package.

e.g. on Debian/Sarge:

$ apt-file search libhdf5- | grep so

libhdf5-doc: usr/share/doc/libhdf5-doc/html/Tutor/software.html
libhdf5-lam-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0
libhdf5-lam-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0.0.0
libhdf5-mpich-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0
libhdf5-mpich-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0.0.0
libhdf5-serial-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0
libhdf5-serial-1.6.2-0: usr/lib/libhdf5-1.6.2.so.0.0.0

another way of searching: (requries more guessing)

$ apt-cache search libhdf5
libhdf5-doc - Hierarchical Data Format 5 (HDF5) - Documentation
libhdf5-lam-1.6.2-0 - Hierarchical Data Format 5 (HDF5) - runtime files - LAM version
libhdf5-lam-dev - Hierarchical Data Format 5 (HDF5) - development files - LAM version
libhdf5-mpich-1.6.2-0 - Hierarchical Data Format 5 (HDF5) - runtime files - MPICH version
libhdf5-mpich-dev - Hierarchical Data Format 5 (HDF5) - development files - MPICH version
libhdf5-serial-1.6.2-0 - Hierarchical Data Format 5 (HDF5) - runtime files - serial version
libhdf5-serial-dev - Hierarchical Data Format 5 (HDF5) - development files - serial version
mpb-mpi - MIT Photonic-Bands, parallel (mpich) version
libhdf5-serial-1.6.1-0 - Hierarchical Data Format 5 (HDF5) - runtime files - serial version

or is it already on your machine?
$ locate libhdf5- | grep so

if so, which package it came from:
$ dpkg -S /usr/lib/libhdf5-1.6.1.so.0.0.0
libhdf5-serial-1.6.1-0: /usr/lib/libhdf5-1.6.1.so.0.0.0

my (very rough) guess though is that CRAN (R) is providing a precompiled
binary, which was compiled on someone else's machine with libraries in
different places. perhaps you need to use the R package install method
with compiles the module locally after source download?

??,
Hamish