[GRASS-user] Compiling r.seg

Hi there

I have tried to compile r.seg, a Segmentation developed by Trento University. I Know this is not part of GRASS6.4 and not even an addon but can you help me on this? (where I got the module http://www.ing.unitn.it/~grass/)

This is the command:sudo make -C r.seg MODULE_TOPDIR=/usr/local/grass-6.4.0svn
The output:

make: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg' aseglib make[1]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/aseglib’
make[1]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/aseglib' src make[1]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/src’
gcc -L/usr/local/grass-6.4.0svn/lib -Wl,–export-dynamic -Wl,-rpath-link,/usr/local/grass-6.4.0svn/lib -o /usr/local/grass-6.4.0svn/bin/r.seg OBJ.i686-pc-linux-gnu/main.o -laseg -lgrass_gis -lgrass_datetime -lz -lm -lz
make htmlcmd
make[2]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/src' make /usr/local/grass-6.4.0svn/docs/html/r.seg.html HTMLSRC=/usr/local/grass-6.4.0svn/bin/r.seg make[3]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/src’
if [ “/usr/local/grass-6.4.0svn/bin/r.seg” != “” ] ; then GISRC=/usr/local/grass-6.4.0svn/demolocation/grassrc64 GISBASE=/usr/local/grass-6.4.0svn PATH=“/usr/local/grass-6.4.0svn/bin:$PATH” LD_LIBRARY_PATH=“/usr/local/grass-6.4.0svn/bin:/usr/local/grass-6.4.0svn/lib:” LC_ALL=C /usr/local/grass-6.4.0svn/bin/r.seg --html-description < /dev/null | grep -v ‘|’ > r.seg.tmp.html ; true ; fi
/usr/local/grass-6.4.0svn/tools/mkhtml.sh r.seg ; mkdir -p /usr/local/grass-6.4.0svn/docs/html ; /usr/bin/install -c -m 644 r.seg.tmp.html /usr/local/grass-6.4.0svn/docs/html/r.seg.html ; for file in *.png *.jpg ; do head -n 1 $file | grep ‘^#!’ > /dev/null ; if [ $? -ne 0 ] ; then /usr/bin/install -c -m 644 $file /usr/local/grass-6.4.0svn/docs/html ; fi done 2> /dev/null ; true
make[3]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/src' make[2]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/src’
make mancmd
make[2]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/src' make /usr/local/grass-6.4.0svn/man/man1/r.seg.1 MANSRC=/usr/local/grass-6.4.0svn/docs/html/r.seg.html make[3]: Entering directory /home/knrr/Desktop/GRASS_dvp/r.seg/src’
mkdir -p /usr/local/grass-6.4.0svn/man/man1
GRASS_PERL=/usr/bin/perl VERSION_NUMBER=6.4.0svn sh /usr/local/grass-6.4.0svn/tools/g.html2man/g.html2man /usr/local/grass-6.4.0svn/docs/html/r.seg.html /usr/local/grass-6.4.0svn/man/man1/r.seg.1 1
sh: Can’t open /usr/local/grass-6.4.0svn/tools/g.html2man/g.html2man
make[3]: *** [/usr/local/grass-6.4.0svn/man/man1/r.seg.1] Error 2
make[3]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/src' make[2]: *** [mancmd] Error 2 make[2]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/src’
make[1]: *** [cmd] Error 2
make[1]: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg/src' make: Leaving directory /home/knrr/Desktop/GRASS_dvp/r.seg’

Does it seems to all ok?
At my GRASS binary folder I don’t have an executable (application/x-executable) but a KSeg document (application/x-kseg) that can be runned from GRASS. Is this normal/expected?

Thanks
Katrin

Hi,
I compiled r.seg in grass 6.5 (Ubuntu 10.04) but it must be the same in grass 6.4. Just copy r.seg directory to the raster subdirectory of the grass source code tree.
cd /usr/local/grass-6.4.0svn/ratster/r.seg
make
when done…
cd /usr/local/grass-6.4.0svn
make
sudo make install.

Hope it helps