[R-sig-Geo] Linking problem with rgdal

Rainer M Krug Rainer at krugs.de
Tue Feb 4 14:22:08 CET 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/04/14, 13:23 , Mark Payne wrote:
> 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.

I stand to be corrected, as I haven't done this for quite some time:

The paths you specify are for compile time, the ones missing are for
run time. So you have to add the library path of gdal to your library
paths, e.g. via setting the variable LD_LIBRARY_PATH

Hope this helps,

Rainer

> 
> 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
> 
> _______________________________________________ R-sig-Geo mailing
> list R-sig-Geo at r-project.org 
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

- -- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer at krugs.de

Skype:      RMkrug
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS8OmAAAoJENvXNx4PUvmC/MkH/Am6KkAqbyTf6FukxDrVGKft
3wyHA/Rnb/ujlkVt4/+okjIadE0N9FnKHCFshudDEqvZl2CJdvKedmAE5cERhFS7
actXf8iJKiFklRYlAXIscJ2A7AyKUqIL5NjvDXwiRNLThOvPQ5b4iuv4e9AP18A5
NAfY/zz7pOA2Q2aBvZFFxEX6YC3sLDo2cf8hxZoBpqaTeUpvZ5k0i0ND1FGE82mE
T5mRBfndDnCZ+7f4IMrVxWJ67J55/0DUaisOno2o+zboUckySmYrjLlLQ/q7FcaX
1pRgSPjgff/KLTnYkJgnU4gkvyg50Re5gStzPT3KMJvZhbxpjIIo8zYj3nOEx38=
=Xloy
-----END PGP SIGNATURE-----



More information about the R-sig-Geo mailing list