[GRASS-dev] [bug #4519] (grass) errors in Grass 55 build
Glynn Clements
glynn at gclements.plus.com
Tue Jul 25 03:56:40 EDT 2006
Paul Kelly wrote:
> >>OK I think I have fixed those in the 5.5 CVS HEAD (apart from the C++ errors
> >>in r.terraflow which I don't have a clue about).
> >
> >
> > Allright, mostly OK. Only src.contrib/SDTS still fails (and the r.terraflow,
> > but since you can't help it let's leave this aside for a moment):
> >
> [...]
> > make[1]: Entering directory
> > `/home/shoofi/src/straight/grass/src.contrib/SDTS/mapdev/v.out.sdts'
> > gcc -I/home/shoofi/src/straight/grass/src/include
> > -I../../libes/fips123/f123inc -g -O2 -c v.out.sdts.c -o
> > OBJ.i686-pc-linux-gnu/v.out.sdts.o
> > In file included from v.out.sdts.c:30:
> > globals.h:30: error: conflicting types for 'Ddr_elem'
> > externs.h:30: error: previous declaration of 'Ddr_elem' was here
> > globals.h:62: error: conflicting types for 'Mod'
> > externs.h:29: error: previous declaration of 'Mod' was here
> > make[1]: *** [OBJ.i686-pc-linux-gnu/v.out.sdts.o] Error 1
> > make[1]: Leaving directory
> > `/home/shoofi/src/straight/grass/src.contrib/SDTS/mapdev/v.out.sdts'
> > make: *** [all] Error 2
>
> OK well I don't see an easy answer to this so I have reverted my earlier
> change. It obviously hasn't been a problem up to now - it looks like it
> is something to do with your compiler being pedantic about not allowing
> arrays of structs or something, but I'm really not very sure and don't
> think it is worth fixing.
>
> Maybe Glynn will have a clue as I see he made some changes to the
> relevant files in 2001.
It's because the declaration of Ddr_elem uses "struct SDTS_ddr_elems"
before the structure is defined, while the definition uses it
afterwards. The two types are technically different types, resulting
in a "conflicting types" error.
The fix is to put the structure definitions before any variable
declarations or definitions which use them.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list