[GRASSLIST:3336] Re: r.in.gdal (a newbie question)

Glynn Clements glynn.clements at virgin.net
Tue Mar 12 16:19:16 EST 2002


Elsa Rintala wrote:

> I'm having problems using the r.in.gdal program (for importing .img
> files). I've noticed this has been discussed here many times, but since
> I'm a newbie to Linux as well as Grass, I've had difficulties
> understanding the answers provided earlier...
> 
> What exactly is the situation with r.in.gdal? Do you have to go get it
> from www.remotesensing.org (as instructed in some answers), and compile it
> on your computer - allthough there already is a binary file r.in.gdal in
> /usr/local/grass5/bin and a libgdal.1.1.so file in the
> /usr/local/grass5/lib . And why it is that despite of this the program
> reports not finding the above mentioned library file in the above
> mentioned folder?

1. r.in.gdal is part of GRASS, and should be supplied with the rest of
GRASS.

2. r.in.gdal requires libgdal to work; libgdal isn't part of GRASS,
although it may be included in some pre-packaged versions of GRASS.

3. libgdal is written in C++, and requires libstdc++ in order to work. 
Moreover, it requires the exact version of libstdc++ which was used to
compile it. For this reason, pre-compiled versions of libgdal tend not
to be portable between different Linux distributions.

You can tell which version of libstdc++ is required using "ldd", e.g.

	ldd /usr/local/grass5/lib/libgdal.1.1.so

If the version of libstdc++ doesn't match the one which you have, you
will need to re-compile libgdal from the source code.

4. If you have a shared library (e.g. libgdal), but that library
requires another shared library which you don't have (e.g. a specific
version of libstdc++), attempts to load that library will fail. The
error message usually implies that the original shared library (i.e. 
libgdal) cannot be found.

> The error report tells also that the LD_LIBRARY_PATH =
> /usr/local/grass5/lib and that it cannot find configuration file
> /etc/exim.conf - which indeed doesn't exist (or I just failed to notice
> it). In an earlier answer to r.in.gdal problems one was instructed to
> export /usr/local/lib as the LD_LIBRARY_PATH, wich doesn't make sense to
> me since the libgdal... file is not located there.

The reference to exim.conf is probably due to GRASS attempting to send
the error message by email. GRASS itself doesn't reference this file
explicitly.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list