[R-sig-Geo] Linking problem with rgdal

Mark Payne markpayneatwork at gmail.com
Tue Feb 4 13:23:59 CET 2014


Hi,

I'm trying to install rgdal on a Scientific LInux cluster  which I do
not have administrator rights. So far, I have done the following
* Downloaded and installed gdal from source into my home directory ie
configured with
./configure --prefix=$HOME/R/gdal
*Downloaded and install proj4 from source with a similar configuration
./configure --prefix=$HOME/R/proj4/

Next, I try to install the rgdal package specifying the various locations

R CMD INSTALL rgdal_0.8-14.tar.gz
--configure-args='--with-proj-lib=$HOME/R/proj4/lib
--with-proj-include=$HOME/R/proj4/include
--with-gdal-config=$HOME/R/gdal/bin/gdal-config' --preclean
--no-clean-on-error

This generally works up to the point where it tries to do a test load,
giving the message:
....
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/zhome/39/c/38865/R/x86_64-unknown-linux-gnu-library/3.0/rgdal/libs/rgdal.so':
  libgdal.so.1: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed

If I check the contents of the shared object:
ldd ~/R/x86_64-unknown-linux-gnu-library/3.0/rgdal/libs/rgdal.so
    linux-vdso.so.1 =>  (0x00007fff74dff000)
    libgdal.so.1 => not found
    libproj.so.0 => not found
    libR.so => not found
    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f59fe330000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f59fe0ab000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f59fde95000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f59fdb01000)
    /lib64/ld-linux-x86-64.so.2 (0x00000039b3600000)

So for some reason although the build process is recognising the
libraries, it is not storing their location  in the shared object.

This is where my knowledge breaks down. I wonder if I need to force
the build to make static libraries, rather than dynamically linked
ones. But I'm not sure I know what I'm talking about.

Any suggestions would be appreciated.

Mark



More information about the R-sig-Geo mailing list