[GRASS-user] r.stream.basins

Jarek Jasiewicz jarekj at amu.edu.pl
Fri Dec 11 13:59:42 EST 2009


Francesco Mirabella pisze:
> Hi all,
> I trying to compile the r.stream.basins module from the add-ons. I 
> have checkout on the the latest svn version but I get some errors 
> (below), can someone give help?
> many thanks
> Francesco
>
> ------------------------------------------------------------------------------------------------------------------------------------------------- 
>
> cd /usr/local/svn/grass/grass-addons/raster/r.stream.basins
>
> francesco at terra17:/usr/local/svn/grass/grass-addons/raster/r.stream.basins$ 
> make MODULE_TOPDIR=/usr/local/svn/grass/grass640_rc5/
>
> gcc -L/usr/local/svn/grass/grass640_rc5/dist.i686-pc-linux-gnu/lib 
> -Wl,--export-dynamic 
> -Wl,-rpath-link,/usr/local/svn/grass/grass640_rc5/dist.i686-pc-linux-gnu/lib 
>    -o 
> /usr/local/svn/grass/grass640_rc5/dist.i686-pc-linux-gnu/bin/r.stream.basins 
> OBJ.i686-pc-linux-gnu/catchment.o OBJ.i686-pc-linux-gnu/io.o 
> OBJ.i686-pc-linux-gnu/main.o  -lgrass_gis -lgrass_datetime -lz     
> -lm  -lz
> OBJ.i686-pc-linux-gnu/catchment.o: In function `find_outlets':
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/catchment.c:29: 
> undefined reference to `G_malloc'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/catchment.c:37: 
> undefined reference to `G_realloc'
> OBJ.i686-pc-linux-gnu/io.o: In function `create_maps':
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:41: 
> undefined reference to `G_malloc'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:42: 
> undefined reference to `G_malloc'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:45: 
> undefined reference to `G_malloc'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:46: 
> undefined reference to `G_malloc'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:54: 
> undefined reference to `G_malloc'
> OBJ.i686-pc-linux-gnu/io.o:/usr/local/svn/grass/grass-addons/raster/r.stream.basins/io.c:55: 
> more undefined references to `G_malloc' follow
> OBJ.i686-pc-linux-gnu/main.o: In function `main':
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/main.c:41: 
> undefined reference to `G_gisinit'
> /usr/local/svn/grass/grass-addons/raster/r.stream.basins/main.c:116: 
> undefined reference to `G_malloc'
> collect2: ld returned 1 exit status
> make: *** 
> [/usr/local/svn/grass/grass640_rc5/dist.i686-pc-linux-gnu/bin/r.stream.basins] 
> Error 1
> francesco at terra17:/usr/local/svn/grass/grass-addons/raster/r.stream.basins$ 
>
> ------------------------------------------------------------------------------------------------------------------------------------------------- 
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
It looks like r.stream.basins do not see grass library headers. As I see 
you have GRASS compiled from source, you can simply copy r.stream.basins 
to you source/raster directory and make again.

BTW: r.stream.basins is prepared to work with grass65 because in 
cooperation in r.stream.extract and r.stream.order it can use multiple 
flow direction which is only implemented in r.watershed from grass65. So 
I strongly recommend you update grass to the newest svn version
regards
J.


More information about the grass-user mailing list