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

Glynn Clements glynn at gclements.plus.com
Sat Apr 12 19:51:03 EDT 2008


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>


More information about the grass-dev mailing list