[GRASS-user] g.extension (e.g. to install i.landsat.toar)

I'm trying to get the grass add-on i.landsat.toar to work using g.extension,
and I've had many problems. I had been trying it on opensuse 11.3 and I
installed various versions of grass from source, but they all had problems
and did not work. I've almost given up, and now I am running grass on
poseidon linux (ubuntu base) which came preinstalled with Grass 6.4ORC5. My
question is: what is the easiest, most pain-free way to get g.extension to
work? What linux flavour should I be using (and is 32-bit or 64-bit
better)? Which GRASS version number? Do I need to install from source?

If I can't get g.extension to work properly are there any workarounds such
as running it as bash script?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-e-g-to-install-i-landsat-toar-tp5662708p5662708.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Fri, Oct 22, 2010 at 4:20 PM, Nick Jachowski <njachowski@gmail.com> wrote:

I'm trying to get the grass add-on i.landsat.toar to work using g.extension,
and I've had many problems. I had been trying it on opensuse 11.3 and I
installed various versions of grass from source, but they all had problems
and did not work.

You mean that GRASS (which version) did not work or that g.extension within
it failed? Note that there is a known bug for g.extension usage in the Makefile
system due to a wrong path which also manifests in OpenSuse.

I've almost given up, and now I am running grass on
poseidon linux (ubuntu base) which came preinstalled with Grass 6.4ORC5.

(that's fairly old...)

My question is: what is the easiest, most pain-free way to get g.extension to
work? What linux flavour should I be using (and is 32-bit or 64-bit
better)? Which GRASS version number? Do I need to install from source?

It would be needed to fix for many platforms this bug:
http://trac.osgeo.org/grass/ticket/620

In general, please use 6.4.0 (or 6.4.svn).

If I can't get g.extension to work properly are there any workarounds such
as running it as bash script?

It needs to be compiled. You can manually fix the path in
include/Make/Platform.make (see above ticket), then g.extension
should work. Yesterday I made an attempt to also fix the
system wide installation (in GRASS 6.5) which might be
backported.

Markus

Thanks for your help Markus.

I am now trying to use g.extension with GRASS 6.5.svn and GRASS 7.0.svn on Ubuntu 10.10, however when I start either versions of GRASS and try to open a new location (using the wxPython gui) I get the following error:

g.proj: error while loading shared libraries: libgdal1.5.0.so.1: cannot open shared object file: No such file or directory

I searched for libgdal and found that I have libgdal1.6.0.so.1 at ./usr/lib/libgdal1.6.0.so.1

I don’t care whether or not I get GRASS working on this OS or even what version of GRASS I get to work. I am just interested in the easiest way to use g.extension to be able to use the i.landsat.toar addon. Is there a flavour of linux that is particularly easy to use when it comes to GRASS? And would you recommend GRASS 6.4.0, 6.5, or 7.0 to get g.extension to work?

Any help is appreciated, thanks!

Nick

On Fri, Oct 22, 2010 at 12:09 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Oct 22, 2010 at 4:20 PM, Nick Jachowski <njachowski@gmail.com> wrote:

I’m trying to get the grass add-on i.landsat.toar to work using g.extension,
and I’ve had many problems. I had been trying it on opensuse 11.3 and I
installed various versions of grass from source, but they all had problems
and did not work.

You mean that GRASS (which version) did not work or that g.extension within
it failed? Note that there is a known bug for g.extension usage in the Makefile
system due to a wrong path which also manifests in OpenSuse.

I’ve almost given up, and now I am running grass on
poseidon linux (ubuntu base) which came preinstalled with Grass 6.4ORC5.

(that’s fairly old…)

My question is: what is the easiest, most pain-free way to get g.extension to
work? What linux flavour should I be using (and is 32-bit or 64-bit
better)? Which GRASS version number? Do I need to install from source?

It would be needed to fix for many platforms this bug:
http://trac.osgeo.org/grass/ticket/620

In general, please use 6.4.0 (or 6.4.svn).

If I can’t get g.extension to work properly are there any workarounds such
as running it as bash script?

It needs to be compiled. You can manually fix the path in
include/Make/Platform.make (see above ticket), then g.extension
should work. Yesterday I made an attempt to also fix the
system wide installation (in GRASS 6.5) which might be
backported.

Markus

I got the latest version of GRASS 6.4.1svn running (from the binaries), and I have a new error message when I try to use g.extension.

GRASS 6.4.1svn (10.27):~ > g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)…
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Checked out revision 44052.
Compiling <i.landsat.toar>…
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/bin.x86_64-unknown-linux-gnu
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include/grass
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/lib
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/bin
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/etc
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/driver
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/driver/db
mkdir -p /home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/fonts
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p OBJ.x86_64-unknown-linux-gnu
gcc -I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include -g -Wall -Werror-implicit-function-declaration -fno-common -DPACKAGE="“grassmods”" -I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/earth_sun.o -c earth_sun.c
gcc -I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include -g -Wall -Werror-implicit-function-declaration -fno-common -DPACKAGE="“grassmods”" -I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include -o OBJ.x86_64-unknown-linux-gnu/landsat.o -c landsat.c
landsat.c:4:23: error: grass/gis.h: No such file or directory
landsat.c: In function ‘lsat_bandctes’:
landsat.c:133: error: implicit declaration of function ‘G_verbose_message’
make: *** [OBJ.x86_64-unknown-linux-gnu/landsat.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.

Do I have to install GRASS from source for g.extension to work?

Thanks,
Nick

On Sun, Oct 24, 2010 at 9:56 PM, Nick Jachowski <njachowski@gmail.com> wrote:

Thanks for your help Markus.

I am now trying to use g.extension with GRASS 6.5.svn and GRASS 7.0.svn on Ubuntu 10.10, however when I start either versions of GRASS and try to open a new location (using the wxPython gui) I get the following error:

g.proj: error while loading shared libraries: libgdal1.5.0.so.1: cannot open shared object file: No such file or directory

I searched for libgdal and found that I have libgdal1.6.0.so.1 at ./usr/lib/libgdal1.6.0.so.1

I don’t care whether or not I get GRASS working on this OS or even what version of GRASS I get to work. I am just interested in the easiest way to use g.extension to be able to use the i.landsat.toar addon. Is there a flavour of linux that is particularly easy to use when it comes to GRASS? And would you recommend GRASS 6.4.0, 6.5, or 7.0 to get g.extension to work?

Any help is appreciated, thanks!

Nick

On Fri, Oct 22, 2010 at 12:09 PM, Markus Neteler <neteler@osgeo.org> wrote:

On Fri, Oct 22, 2010 at 4:20 PM, Nick Jachowski <njachowski@gmail.com> wrote:

I’m trying to get the grass add-on i.landsat.toar to work using g.extension,
and I’ve had many problems. I had been trying it on opensuse 11.3 and I
installed various versions of grass from source, but they all had problems
and did not work.

You mean that GRASS (which version) did not work or that g.extension within
it failed? Note that there is a known bug for g.extension usage in the Makefile
system due to a wrong path which also manifests in OpenSuse.

I’ve almost given up, and now I am running grass on
poseidon linux (ubuntu base) which came preinstalled with Grass 6.4ORC5.

(that’s fairly old…)

My question is: what is the easiest, most pain-free way to get g.extension to
work? What linux flavour should I be using (and is 32-bit or 64-bit
better)? Which GRASS version number? Do I need to install from source?

It would be needed to fix for many platforms this bug:
http://trac.osgeo.org/grass/ticket/620

In general, please use 6.4.0 (or 6.4.svn).

If I can’t get g.extension to work properly are there any workarounds such
as running it as bash script?

It needs to be compiled. You can manually fix the path in
include/Make/Platform.make (see above ticket), then g.extension
should work. Yesterday I made an attempt to also fix the
system wide installation (in GRASS 6.5) which might be
backported.

Markus

On Wed, Oct 27, 2010 at 4:02 PM, Nick Jachowski <njachowski@gmail.com> wrote:

I got the latest version of GRASS 6.4.1svn running (from the binaries), and

Which binaries are that from where?

I have a new error message when I try to use g.extension.
----------------
GRASS 6.4.1svn (10.27):~ > g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Checked out revision 44052.
Compiling <i.landsat.toar>...
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/bin.x86_64-unknown-linux-gnu
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include/grass
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/lib
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/bin
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/etc
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/driver
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/driver/db
mkdir -p
/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/fonts
test -d OBJ.x86_64-unknown-linux-gnu || mkdir -p
OBJ.x86_64-unknown-linux-gnu
gcc
-I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include
-g -Wall -Werror-implicit-function-declaration -fno-common
-DPACKAGE=\""grassmods"\"
-I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include
-o OBJ.x86_64-unknown-linux-gnu/earth_sun.o -c earth_sun.c
gcc
-I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include
-g -Wall -Werror-implicit-function-declaration -fno-common
-DPACKAGE=\""grassmods"\"
-I/home/neteler/grass64_svn_relbranch_bin_snapshot/grass64_relbranch/dist.x86_64-unknown-linux-gnu/include
-o OBJ.x86_64-unknown-linux-gnu/landsat.o -c landsat.c
landsat.c:4:23: error: grass/gis.h: No such file or directory

This indicates that the path in include/Make/Platform.make is wrong.
This is a known bug on some platforms, unfortunately nobody steps up
to fix it...

landsat.c: In function ‘lsat_bandctes’:
landsat.c:133: error: implicit declaration of function ‘G_verbose_message’
make: *** [OBJ.x86_64-unknown-linux-gnu/landsat.o] Error 1
ERROR: Compilation failed, sorry. Please check above error messages.
------------------
Do I have to install GRASS from source for g.extension to work?

In general no. You may just fix the wrong path in above file.

Markus

Thanks,
Nick
On Sun, Oct 24, 2010 at 9:56 PM, Nick Jachowski <njachowski@gmail.com>
wrote:

Thanks for your help Markus.

I am now trying to use g.extension with GRASS 6.5.svn and GRASS 7.0.svn on
Ubuntu 10.10, however when I start either versions of GRASS and try to open
a new location (using the wxPython gui) I get the following error:

> g.proj: error while loading shared libraries: libgdal1.5.0.so.1: cannot
> open shared object file: No such file or directory

I searched for libgdal and found that I have libgdal1.6.0.so.1 at
./usr/lib/libgdal1.6.0.so.1

I don't care whether or not I get GRASS working on this OS or even what
version of GRASS I get to work. I am just interested in the easiest way to
use g.extension to be able to use the i.landsat.toar addon. Is there a
flavour of linux that is particularly easy to use when it comes to GRASS?
And would you recommend GRASS 6.4.0, 6.5, or 7.0 to get g.extension to
work?

Any help is appreciated, thanks!

Nick

On Fri, Oct 22, 2010 at 12:09 PM, Markus Neteler <neteler@osgeo.org>
wrote:

On Fri, Oct 22, 2010 at 4:20 PM, Nick Jachowski <njachowski@gmail.com>
wrote:
>
> I'm trying to get the grass add-on i.landsat.toar to work using
> g.extension,
> and I've had many problems. I had been trying it on opensuse 11.3 and
> I
> installed various versions of grass from source, but they all had
> problems
> and did not work.

You mean that GRASS (which version) did not work or that g.extension
within
it failed? Note that there is a known bug for g.extension usage in the
Makefile
system due to a wrong path which also manifests in OpenSuse.

> I've almost given up, and now I am running grass on
> poseidon linux (ubuntu base) which came preinstalled with Grass
> 6.4ORC5.

(that's fairly old...)

> My question is: what is the easiest, most pain-free way to get
> g.extension to
> work? What linux flavour should I be using (and is 32-bit or 64-bit
> better)? Which GRASS version number? Do I need to install from
> source?

It would be needed to fix for many platforms this bug:
http://trac.osgeo.org/grass/ticket/620

In general, please use 6.4.0 (or 6.4.svn).

> If I can't get g.extension to work properly are there any workarounds
> such
> as running it as bash script?

It needs to be compiled. You can manually fix the path in
include/Make/Platform.make (see above ticket), then g.extension
should work. Yesterday I made an attempt to also fix the
system wide installation (in GRASS 6.5) which might be
backported.

Markus

I have the same problem (ubuntu 10.10, with repo ubuntugis)

GRASS 6.4.0 (utm_wgs84):~ > g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Estratta revisione 44145.
Compiling <i.landsat.toar>...
Makefile:8: /usr/lib/grass64/include/Make/Module.make: Nessun file o
directory
make: *** Nessuna regola per generare l'obiettivo
«/usr/lib/grass64/include/Make/Module.make». Stop.
ERRORE: Compilation failed, sorry. Please check above error messages.

/usr/lib/grass64$ ls
AUTHORS.gz bwidget docs etc GPL.TXT locale
bin COPYING driver fonts lib scripts

Thanks
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-e-g-to-install-i-landsat-toar-tp5662708p5693486.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Mon, Nov 1, 2010 at 12:24 PM, Gabriele N. <gis.gn@libero.it> wrote:

I have the same problem (ubuntu 10.10, with repo ubuntugis)

GRASS 6.4.0 (utm_wgs84):~ > g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Estratta revisione 44145.
Compiling <i.landsat.toar>...
Makefile:8: /usr/lib/grass64/include/Make/Module.make: Nessun file o
directory
make: *** Nessuna regola per generare l'obiettivo
«/usr/lib/grass64/include/Make/Module.make». Stop.
ERRORE: Compilation failed, sorry. Please check above error messages.

/usr/lib/grass64$ ls
AUTHORS.gz bwidget docs etc GPL.TXT locale
bin COPYING driver fonts lib scripts

The include/ directory is missing which suggests that the grass-devel
package is not installed.

Markus

Hi Markus.
I have installed grass-dev but now there is another problem (there is a
problem of permissions for the folder creation and does not solve if I
create the folder before launching g.extension):

g.extension i.landsat.toar

Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Estratta revisione 44172.
Compiling <i.landsat.toar>...
mkdir -p /build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu/include/grass
mkdir: impossibile creare la directory
`/build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu': Permesso negato
make: *** [/build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu/include/grass]
Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

Thanks
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-e-g-to-install-i-landsat-toar-tp5662708p5698083.html
Sent from the Grass - Users mailing list archive at Nabble.com.

On Tue, Nov 2, 2010 at 5:16 PM, Gabriele N. <gis.gn@libero.it> wrote:

Hi Markus.
I have installed grass-dev but now there is another problem (there is a
problem of permissions for the folder creation and does not solve if I
create the folder before launching g.extension):

g.extension i.landsat.toar

Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Estratta revisione 44172.
Compiling <i.landsat.toar>...
mkdir -p /build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu/include/grass
mkdir: impossibile creare la directory
`/build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu': Permesso negato
make: *** [/build/buildd/grass-6.4.0/dist.i686-pc-linux-gnu/include/grass]
Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

I have fixed this 1-2 weeks ago (for 6.4.1 and later). Please get the
updated script here:
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/scripts/g.extension/

and try again with this version. You can simply replace the one you have with
this one or rename it or whatever you prefer.
Please let me know if it helps (maybe more tweaks are needed but we are getting
closer!).

Cheers
Markus

Markus, still does not work.
I saw some differences compared to the old script. To understand ... which
is the part that has been changed to fix this?

GRASS 6.4.0 (utm_wgs84):~ > g.extension i.landsat.toar
Fetching <i.landsat.toar> from GRASS-Addons SVN (be patient)...
A i.landsat.toar/landsat_set.c
A i.landsat.toar/local_proto.h
A i.landsat.toar/main.c
A i.landsat.toar/description.html
A i.landsat.toar/landsat.c
A i.landsat.toar/earth_sun.c
A i.landsat.toar/landsat.h
A i.landsat.toar/landsat_met.c
A i.landsat.toar/Makefile
A i.landsat.toar/earth_sun.h
U i.landsat.toar
Estratta revisione 44172.
Compiling <i.landsat.toar>...
mkdir -p /build/buildd/grass-6.4.0/bin.i686-pc-linux-gnu
mkdir: impossibile creare la directory `/build': Permesso negato
make: *** [/build/buildd/grass-6.4.0/bin.i686-pc-linux-gnu] Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.
GRASS 6.4.0 (utm_wgs84):~ > g.extension i.landsat.acca
Fetching <i.landsat.acca> from GRASS-Addons SVN (be patient)...
A i.landsat.acca/tools.c
A i.landsat.acca/local_proto.h
A i.landsat.acca/main.c
A i.landsat.acca/description.html
A i.landsat.acca/algorithm.c
A i.landsat.acca/Makefile
U i.landsat.acca
Estratta revisione 44172.
Compiling <i.landsat.acca>...
mkdir -p /build/buildd/grass-6.4.0/bin.i686-pc-linux-gnu
mkdir: impossibile creare la directory `/build': Permesso negato
make: *** [/build/buildd/grass-6.4.0/bin.i686-pc-linux-gnu] Errore 1
ERRORE: Compilation failed, sorry. Please check above error messages.

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/g-extension-e-g-to-install-i-landsat-toar-tp5662708p5699112.html
Sent from the Grass - Users mailing list archive at Nabble.com.