[GRASS-dev] Re: [GRASS GIS] #50: g.copy segfaults (debian.gfoss.it package) [and latest SVN]

Dylan Beaudette dylan.beaudette at gmail.com
Sat Apr 12 20:23:17 EDT 2008


On Sat, Apr 12, 2008 at 4:51 PM, Glynn Clements
<glynn at gclements.plus.com> wrote:
>
>  Dylan Beaudette wrote:
>
>  > >  > #50: g.copy segfaults (debian.gfoss.it package) [and latest SVN]
>
>
> > >  >  > Also, it would be useful to know whether the problem occurs when lib/gis
>  > >  >  is compiled with optimisation or when general/manage is compiled with
>  > >  >  optimisation.
>  > >  >
>  > >  >  After the configure step, how can I disable optimization for specific
>  > >  >  parts of the source tree?
>  > >
>  > >  First, compile everything. Then, re-compile specific parts with
>  > >  different flags using e.g.:
>  > >
>  > >         make -C lib/gis clean
>  > >         make -C lib/gis CFLAGS1='-g -O0'
>
>  > Some tests:
>
>
>  > Final thoughts: something in 'general/manage' . I can't really
>  > speculate any further.
>
>  Probably something in general/manage/lib (probably do_copy.c).
>
>  The library is a static library, so just rebuilding the library
>  doesn't help, as the g.copy command will still be using the old
>  library code.
>
>  You can confirm this with:
>
>
>         make -C general/manage clean
>         make -C general/manage CFLAGS1='-g -O0'
>         rm general/manage/lib/OBJ.*/do_copy.o
>         rm dist.*/bin/g.copy
>
>         make -C general/manage CFLAGS1='-g -O2'
>
>  The last "make" should re-compile do_copy.c (with -O2) and re-link
>  g.copy.
>
>  If the problem is in do_copy.c, the resulting g.copy will segfault.
>
>  --
>
>
> Glynn Clements <glynn at gclements.plus.com>
>

Thanks for the excellent advice Glynn.

Based on the above set of commands, I get a segfaulting g.copy
rast=..., suggesting that there is a problem in "do_copy.c".

I will update the ticket with these details.

Thanks,

Dylan


More information about the grass-dev mailing list