[GRASS-user] g.extension not working

Daniel Victoria daniel.victoria at gmail.com
Mon Aug 23 21:12:47 EDT 2010


Compiling a fresh svn checkout got rid of the [: 196 problem in
g.extension but I still can't compile r.stream.order.

Also, I don't know which -W parameters I should remove from the
configure script. I'm using a configure script written by Markus
Neteler :) in 2007 - Anne Ghisla kindly sent me a copy

Cheers
Daniel

On Wed, Aug 18, 2010 at 10:14 AM, Markus Neteler <neteler at osgeo.org> wrote:
> On Wed, Aug 18, 2010 at 2:28 PM, Daniel Victoria
> <daniel.victoria at gmail.com> wrote:
>> Hi all,
>>
>> Just got 6.5svn compiled in Ubuntu 9.04 and I'm now trying to install
>> r.stream.order using g.extension. When I give the command
>>
>> g.extension extension=r.stream.order prefix=${GISBASE}
>
> (it should work without the prefix parameter)
>
>> I get:
>> [: 196: /home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu:
>> unexpected operator
>> [: 219: add: unexpected operator
>
> I tried but do not get this error (which apparently doesn't harm, the
> problem below is unrelated).
>
>> And then the files are checked out from svn but compilation fails with
>> the messages bellow. Any hints? Do I need to checkout other extensions
>> first?
>
> No, it is a declaration bug in r.stream.order.
>
>> Thanks
>> Daniel
>>
>> Fetching <r.stream.order> from GRASS-Addons SVN (be patient)...
>> A    r.stream.order/orders.png
>> A    r.stream.order/main.c
>> A    r.stream.order/description.html
>> A    r.stream.order/global.h
>> A    r.stream.order/io.c
>> A    r.stream.order/order.c
>> A    r.stream.order/Makefile
>> Checked out revision 43156.
>> Compiling <r.stream.order>...
>> /home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include/Make/Module.make:25:
>> warning: overriding commands for target `install'
>> /home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include/Make/Rules.make:90:
>> warning: ignoring old commands for target `install'
>> test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
>> gcc -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include
>> -g -Wall -Werror-implicit-function-declaration -fno-common
>> -I/usr/include/gdal -I/usr/include   -DPACKAGE=\""grassmods"\"
>> -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include -o
>> OBJ.i686-pc-linux-gnu/io.o -c io.c
>> io.c: In function ‘create_base_maps’:
>> io.c:57: warning: format not a string literal and no format arguments
>> io.c: In function ‘write_maps’:
>> io.c:172: warning: format not a string literal and no format arguments
>> gcc -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include
>> -g -Wall -Werror-implicit-function-declaration -fno-common
>> -I/usr/include/gdal -I/usr/include   -DPACKAGE=\""grassmods"\"
>> -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include -o
>> OBJ.i686-pc-linux-gnu/main.o -c main.c
>> main.c: In function ‘main’:
>> main.c:142: warning: format not a string literal and no format arguments
>> gcc -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include
>> -g -Wall -Werror-implicit-function-declaration -fno-common
>> -I/usr/include/gdal -I/usr/include   -DPACKAGE=\""grassmods"\"
>> -I/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/include -o
>> OBJ.i686-pc-linux-gnu/order.o -c order.c
>> order.c: In function ‘trib_nums’:
>> order.c:24: warning: format not a string literal and no format arguments
>> order.c:26: warning: format not a string literal and no format arguments
>> order.c: In function ‘find_nodes’:
>> order.c:68: warning: format not a string literal and no format arguments
>> order.c:97: warning: format not a string literal and no format arguments
>> order.c:108: warning: format not a string literal and no format arguments
>> order.c:123: warning: format not a string literal and no format arguments
>> order.c: In function ‘do_cum_length’:
>> order.c:164: warning: format not a string literal and no format arguments
>> order.c: In function ‘strahler’:
>> order.c:259: warning: format not a string literal and no format arguments
>> order.c: In function ‘shreeve’:
>> order.c:313: warning: format not a string literal and no format arguments
>> order.c: In function ‘horton’:
>> order.c:364: warning: format not a string literal and no format arguments
>> order.c: In function ‘hack’:
>> order.c:447: warning: format not a string literal and no format arguments
>> gcc -L/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/lib
>> -Wl,--no-undefined -Wl,--export-dynamic
>> -Wl,-rpath-link,/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/lib
>> -L/usr/lib   -o
>> /home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/bin/r.stream.order
>> OBJ.i686-pc-linux-gnu/io.o OBJ.i686-pc-linux-gnu/main.o
>> OBJ.i686-pc-linux-gnu/order.o  -lgrass_vect -lgrass_dbmibase
>> -lgrass_gis -lgrass_datetime -lz      -lgrass_dbmiclient
>> -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz      -lgrass_gis
>> -lgrass_datetime -lz      -lgrass_dgl -lgrass_dig2 -lgrass_gis
>> -lgrass_datetime -lz     -lgrass_rtree  -lgrass_gis -lgrass_datetime
>> -lz     -lgrass_linkm -lgrass_rtree  -lgrass_dig2 -lgrass_gis
>> -lgrass_datetime -lz     -lgrass_rtree  -lgrass_dgl -lgrass_rtree
>> -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_gis
>> -lgrass_datetime -lz      -lgrass_gis -lgrass_datetime -lz
>> -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz       -L/usr/lib
>> -lgdal1.7.0 -L/usr/lib -lgeos -lgeos_c  -lgrass_dbmiclient
>> -lgrass_dbmibase -lgrass_gis -lgrass_datetime -lz      -lgrass_gis
>> -lgrass_datetime -lz      -lgrass_dbmibase -lgrass_gis
>> -lgrass_datetime -lz       -lgrass_gis -lgrass_datetime -lz     -lm
>> -lz
>> OBJ.i686-pc-linux-gnu/main.o: In function `main':
>> /home/daniel/grassdata/br_wgs84/jip/.tmp/xadrez/2602.0/r.stream.order/main.c:54:
>> multiple definition of `springs'
>> OBJ.i686-pc-linux-gnu/io.o:/home/daniel/grassdata/br_wgs84/jip/.tmp/xadrez/2602.0/r.stream.order/io.c:5:
>> first defined here
>
> these need to be defined "extern" I think.
> @Jarek - could you please fix this?
>
>> OBJ.i686-pc-linux-gnu/main.o: In function `main':
>> /home/daniel/grassdata/br_wgs84/jip/.tmp/xadrez/2602.0/r.stream.order/main.c:54:
>> multiple definition of `outlets'
>> OBJ.i686-pc-linux-gnu/io.o:/home/daniel/grassdata/br_wgs84/jip/.tmp/xadrez/2602.0/r.stream.order/io.c:5:
>> first defined here
>
> ... many more ...
>
>> collect2: ld returned 1 exit status
>> make: *** [/home/daniel/grass/grass6_devel/dist.i686-pc-linux-gnu/bin/r.stream.order]
>> Error 1
>> ERROR: Compilation failed, sorry. Please check above error messages.
>> GRASS 6.5.svn (br_wgs84):~ >
>
> Once the declarations are fixed in r.stream.order it should work.
> A trick for you: declare less -W parameters when configuring GRASS and
> the compiler may work around the problem. Still it should be fixed in SVN.
>
> Markus
>


More information about the grass-user mailing list