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

Markus Neteler neteler at osgeo.org
Fri Oct 29 03:16:46 EDT 2010


On Wed, Oct 27, 2010 at 4:02 PM, Nick Jachowski <njachowski at 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 at 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 at osgeo.org>
>> wrote:
>>>
>>> On Fri, Oct 22, 2010 at 4:20 PM, Nick Jachowski <njachowski at 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
>>
>
>


More information about the grass-user mailing list