[GRASS-dev] question about error in r.watershed

Michael Barton michael.barton at asu.edu
Sat Dec 20 11:44:40 EST 2008


Markus,

I applied your patch and got the following compiler error:

cmb-MBP-2:r.watershed cmbarton$ make
make -C ram || echo /Users/cmbarton/grass_dev/grass6_src/raster/ 
r.watershed/ram >> /Users/cmbarton/grass_dev/grass6_src/error.log
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for  
target `htmletc'
make  htmletc
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for  
target `htmletc'
No docs to generate.
make -C seg || echo /Users/cmbarton/grass_dev/grass6_src/raster/ 
r.watershed/seg >> /Users/cmbarton/grass_dev/grass6_src/error.log
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for  
target `htmletc'
make  htmletc
Makefile:13: warning: overriding commands for target `htmletc'
../../../include/Make/Html.make:53: warning: ignoring old commands for  
target `htmletc'
No docs to generate.
make -C front || echo /Users/cmbarton/grass_dev/grass6_src/raster/ 
r.watershed/front >> /Users/cmbarton/grass_dev/grass6_src/error.log
gcc -I/Users/cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/ 
include  -arch i386 -Os       -DPACKAGE=\""grassmods"\"  -I/Users/ 
cmbarton/grass_dev/grass6_src/dist.i386-apple-darwin9.6.0/include -o  
OBJ.i386-apple-darwin9.6.0/main.o -c main.c
main.c: In function ‘main’:
main.c:224: error: stray ‘\202’ in program
main.c:224: error: stray ‘\202’ in program
make[1]: *** [OBJ.i386-apple-darwin9.6.0/main.o] Error 1


On Dec 20, 2008, at 1:54 AM, Markus Metz wrote:

>
>
> Michael Barton wrote:
>> I am running the new r.watershed (SVN from 10 December) and got an  
>> error in calculating the ls factor.
>>
>> r.watershed elevation=elevation.dem at PERMANENT  
>> length.slope=atest_rs_ls  
>> memory=300                                                       
>> ERROR: /Applications/GRASS-6.4.app/Contents/MacOS/etc/r.wate
>> rshed.ram [-4] el=elevation_map t=swale_threshold
>> [dr=drain_direction_map] [de=depression_map]
>> [ac=accumulation_map] [di=display_map] [ms=max_slope_length]
>> [ob=overland_blocking_map] [S=slope_steepness_map]
>> LS=length_slope_map [r=rill_erosion_map]
>> [sd=slope_deposition value or map]
>> Subprocess failed with exit code 256
>> category information for [atest_rs_ls] in [PERMANENT]
>> missing or invalid
>>
>> Am I doing something wrong, or is this a bug?
> This is a bug. If you specify length.slope you must give a basin  
> threshold value.
> Running
> r.watershed elevation=elevation.dem at PERMANENT  
> length.slope=atest_rs_ls threshold=3000
> works.
> This is not caught in front/main.c, I will supply a patch
> The fix would be to add the following lines in front/main.c at line  
> 223
>
>   /* LS factor and basin.thresh */
>   err += (opt14->answer != NULL && opt6->answer == NULL);
>
> Markus M
>



More information about the grass-dev mailing list