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@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@terra17:/usr/local/svn/grass/grass-addons/raster/r.stream.basins$
-------------------------------------------------------------------------------------------------------------------------------------------------
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@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@terra17:/usr/local/svn/grass/grass-addons/raster/r.stream.basins$
-------------------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
grass-user mailing list
grass-user@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.
Hi Jarek,
thanks for your message, I already have installed the r.stream.extract and r.stream.order in grass64rc5.
I have tried copying the r.stream.basins directory directly into the source raster directory but I get the same error. Also, I updated the latest svn version of both grass64rc5 and grass70 but in grass64rc5 I still get the same error, while in grass70 I can't "make libs" (see below) prior to "make".
--------------------------------------------------------------------------------------------------------------------------------
francesco@terra17:/usr/local/svn/grass/grass_trunk$ make libs
make -C lib/ headers
make[1]: Entering directory `/usr/local/svn/grass/grass_trunk/lib'
Makefile:66: warning: overriding commands for target `/usr/local/svn/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass'
../include/Make/Rules.make:16: warning: ignoring old commands for target `/usr/local/svn/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass'
make[1]: *** No rule to make target `headers'. Stop.
make[1]: Leaving directory `/usr/local/svn/grass/grass_trunk/lib'
make: *** [libs] Error 2
francesco@terra17:/usr/local/svn/grass/grass_trunk$
--------------------------------------------------------------------------------------------------------------------------------
Do you think I should try grass65 ?
Francesco
Jarek Jasiewicz wrote:
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@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@terra17:/usr/local/svn/grass/grass-addons/raster/r.stream.basins$
-------------------------------------------------------------------------------------------------------------------------------------------------
_______________________________________________
grass-user mailing list
grass-user@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.