[GRASSLIST:1038] r.in.gdal installation

Hello,

quite a while ago I installed the source code of 5.0.2 but unfortunately
without r.in.gdal. Now I want to install this module and followed the
instruction on the grass site:

Installing single modules from source:

The "configure" process creates two scripts (after "make install"
these scripts will be stored in /usr/local/bin/ if not having used
configure's option "--with-bindir")

   gmake5
   gmake5 -i
   gmakelinks5 -i

Use script "gmake5" to compile single modules locally, run
"gmakelinks5" afterwards to set internal links for the new module.
The "-i" flag will install them into target directory, so that no
further "make install" is required.

but I get the following prompt

oggi@wz3x64:/usr/local/bin> gmake5
/usr/local/bin/gmake5: line 9:
/home/oggi/GRASS/GRASS_502/grass5.0.2/src/CMD/generic/gmake.sh: No such file
or directory
oggi@wz3x64:/usr/local/bin>

this folder has been deleted during my last clean-up session :frowning: would this
problem be solved if I download the source again and extract it in the same
path? or did grass modify these files during installation?
and when do I tell grass to install r.in.gdal?

thanks for your help, cheers Martin

Martin Wegmann wrote:

quite a while ago I installed the source code of 5.0.2 but unfortunately
without r.in.gdal. Now I want to install this module and followed the
instruction on the grass site:

Note that r.in.gdal isn't optional; "make" will always attempt to
build it. By default, r.in.gdal will attempt to load the GDAL library
(libgdal) dynamically; libgdal doesn't have to be present in order to
compile r.in.gdal.

So, provided that you are using a platform which provides dlopen()
(e.g. Linux, Solaris, available as an add-on for MacOSX), and you
didn't use --with-gdal (which results in r.in.gdal linking directly to
libgdal), you should already have r.in.gdal; you just need to install
libgdal in a suitable location.

Installing single modules from source:

The "configure" process creates two scripts (after "make install"
these scripts will be stored in /usr/local/bin/ if not having used
configure's option "--with-bindir")

   gmake5
   gmake5 -i
   gmakelinks5 -i

Use script "gmake5" to compile single modules locally, run
"gmakelinks5" afterwards to set internal links for the new module.
The "-i" flag will install them into target directory, so that no
further "make install" is required.

but I get the following prompt

oggi@wz3x64:/usr/local/bin> gmake5
/usr/local/bin/gmake5: line 9:
/home/oggi/GRASS/GRASS_502/grass5.0.2/src/CMD/generic/gmake.sh: No such file
or directory
oggi@wz3x64:/usr/local/bin>

this folder has been deleted during my last clean-up session :frowning: would this
problem be solved if I download the source again and extract it in the same
path? or did grass modify these files during installation?

In order for gmake5 to work, the GRASS source needs to be installed in
the directory referenced by the gmake5 script, and it needs to have
been configured and at least partially built.

and when do I tell grass to install r.in.gdal?

The correct usage of gmake5 is to either specify the pathname to the
module's directory, relative to the top of the GRASS source tree, e.g.

  gmake5 -i src/raster/r.in.gdal

or to change to the module's directory and run gmake5 without a
pathname, e.g.

  cd /home/oggi/GRASS/GRASS_502/grass5.0.2/src/raster/r.in.gdal
  gmake5 -i

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

On Thursday 28 August 2003 05:05, Glynn Clements wrote:

Martin Wegmann wrote:
> quite a while ago I installed the source code of 5.0.2 but unfortunately
> without r.in.gdal. Now I want to install this module and followed the
> instruction on the grass site:

Note that r.in.gdal isn't optional; "make" will always attempt to
build it. By default, r.in.gdal will attempt to load the GDAL library
(libgdal) dynamically; libgdal doesn't have to be present in order to
compile r.in.gdal.

ok, well then only libgdal is missing, thanks for this info

So, provided that you are using a platform which provides dlopen()
(e.g. Linux, Solaris, available as an add-on for MacOSX)

it's Linux

didn't use --with-gdal (which results in r.in.gdal linking directly to
libgdal), you should already have r.in.gdal; you just need to install
libgdal in a suitable location.

how do I install libgdal (as well with gmake5 as you described?) and what is a
suitable location?
as far as I understood your gmake5 instruction, I do have to reinstall the
grass5 source so that the files are partially build/configured before I will
be able to install libgdal, don't I?.

thanks Martin

> Installing single modules from source:
>
> The "configure" process creates two scripts (after "make install"
> these scripts will be stored in /usr/local/bin/ if not having used
> configure's option "--with-bindir")
>
> gmake5
> gmake5 -i
> gmakelinks5 -i
>
> Use script "gmake5" to compile single modules locally, run
> "gmakelinks5" afterwards to set internal links for the new module.
> The "-i" flag will install them into target directory, so that no
> further "make install" is required.
>
>
> but I get the following prompt
>
> oggi@wz3x64:/usr/local/bin> gmake5
> /usr/local/bin/gmake5: line 9:
> /home/oggi/GRASS/GRASS_502/grass5.0.2/src/CMD/generic/gmake.sh: No such
> file or directory
> oggi@wz3x64:/usr/local/bin>
>
> this folder has been deleted during my last clean-up session :frowning: would
> this problem be solved if I download the source again and extract it in
> the same path? or did grass modify these files during installation?

In order for gmake5 to work, the GRASS source needs to be installed in
the directory referenced by the gmake5 script, and it needs to have
been configured and at least partially built.

> and when do I tell grass to install r.in.gdal?

The correct usage of gmake5 is to either specify the pathname to the
module's directory, relative to the top of the GRASS source tree, e.g.

  gmake5 -i src/raster/r.in.gdal

or to change to the module's directory and run gmake5 without a
pathname, e.g.

  cd /home/oggi/GRASS/GRASS_502/grass5.0.2/src/raster/r.in.gdal
  gmake5 -i

Martin Wegmann wrote:

> didn't use --with-gdal (which results in r.in.gdal linking directly to
> libgdal), you should already have r.in.gdal; you just need to install
> libgdal in a suitable location.

how do I install libgdal (as well with gmake5 as you described?)

GDAL isn't part of GRASS. It's built and installed the same way as
most packages, i.e. download, extract, configure, make, install.

GDAL is at:

  http://www.remotesensing.org/gdal/

and what is a suitable location?

Any of:

1. $GISBASE/lib, i.e. /usr/local/grass5/lib, if GRASS is installed
under /usr/local/grass5.

2. $GDAL_HOME, i.e. set GDAL_HOME to the directory containing
libgdal.1.1.so.

3. Wherever the loader normally looks for shared libraries, i.e. in a
directory which is listed in $LD_LIBRARY_PATH or in /etc/ld.so.conf.
For ld.so.conf, you have to run "ldconfig" after installing the
library.

as far as I understood your gmake5 instruction, I do have to reinstall the
grass5 source so that the files are partially build/configured before I will
be able to install libgdal, don't I?.

No. If you already have the r.in.gdal binary, just download, build and
install libgdal.

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