[GRASS5] GRASS 5.1 compile error

GFernandez-Victorio at IGAE.minhac.es GFernandez-Victorio at IGAE.minhac.es
Wed May 21 03:50:47 EDT 2003


> > gcc -g -Wall  -Wall  -I/data/GRASSCVS/grass51/include
> > -I/data/GRASSCVS/grass51/dist.i686-pc-linux-gnu/include    
> > -I/data/GRASSCVS/grass51/include
> > -I/data/GRASSCVS/grass51/dist.i686-pc-linux-gnu/include \
> >         -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
> > lex.l: In function `yyerror':
> > lex.l:235: `YY_FLUSH_BUFFER' undeclared (first use in this function)
> > lex.l:235: (Each undeclared identifier is reported only once
> > lex.l:235: for each function it appears in.)
> > lex.l: At top level:
> 
> Moritz.
> 
> I had the same problem a few weeks ago. I found at Google that it 
> seems to be related to an ancient bug in flex. 
As a followup:

I've found that current flex version is 2.5.31 in:

http://sourceforge.net/projects/lex/

This is the one being distributed with Debian Unstable. When using
the version included with Debian, I get the same error of Moritz.

gfv at caca:~/grass/grass51$ flex -V
flex 2.5.31
gfv at caca:~/grass/grass51$ make
[...]
        -o OBJ.i686-pc-linux-gnu/lex.yy.o -c lex.yy.c
lex.l: En la funci?n `yyerror':
lex.l:235: error: `YY_FLUSH_BUFFER' undeclared (first use in this
function)
lex.l:235: error: (Each undeclared identifier is reported only once
lex.l:235: error: for each function it appears in.)
/usr/include/stdlib.h: En el nivel principal:
/home/gfv/grass/grass51/include/sqlp.h:145: aviso: `newNode' declared
`static' but never defined
make[3]: *** [OBJ.i686-pc-linux-gnu/lex.yy.o] Error 1
make[3]: Leaving directory `/home/gfv/grass/grass51/lib/db/sqlp'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/home/gfv/grass/grass51/lib/db'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/gfv/grass/grass51/lib'
make: *** [default] Error 1

I had downloaded 2.5.4a version from 

ftp://ftp.gnu.org/non-gnu/flex

and compiled it. 

When compiling ("make" after "make clean") GRASS with 
the PATH set to /usr/local/bin before /usr/bin, 
(IOW: using the version 2.5.4a from sources instead of 
version 2.5.31),
everithing goes OK(*).

I was going to fill a bug on Debian flex, but before that:

Moritz, are you using Debian unstable?
Others using Debian unstable, can you confirm this problem?

Regards


Gonzalo

(*)Side note: Last night, after cvs up -dP, make clean
make mix, make, I got a new error I hadn't had before.
[...]
gcc -g -mcpu=pentiumpro -O2  -Wall  -I/home/gfv/grass/grass51/include
-I/home/gfv/grass/grass51/dist.i686-pc-linux-gnu/include   
-I/home/gfv/grass/grass51/include
-I/home/gfv/grass/grass51/dist.i686-pc-linux-gnu/include \
        -o OBJ.i686-pc-linux-gnu/spot_dist.o -c spot_dist.c
spot_dist.c:57: aviso: return type defaults to `int'
spot_dist.c: En la funci?n `spot_dist':
spot_dist.c:84: aviso: type defaults to `int' in declaration of `i'
spot_dist.c:122:9: falta car?cter terminando "
spot_dist.c:123:8: falta car?cter terminando "
spot_dist.c:64: aviso: unused variable `F'
spot_dist.c:140: aviso: control reaches end of non-void function
/usr/include/bits/mathinline.h: En el nivel principal:
/home/gfv/grass/grass51/include/gis.h:36: aviso: `GRASS_copyright'
defined but not used
make[3]: *** [OBJ.i686-pc-linux-gnu/spot_dist.o] Error 1
make[3]: Leaving directory
`/home/gfv/grass/grass51/raster/wildfire/r.ros'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/home/gfv/grass/grass51/raster/wildfire'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/home/gfv/grass/grass51/raster'
make: *** [default] Error 1

The error is in lines 122-123, and it says something like 
missing closing "

I edited raster/wildfire/r.ros/spot_dist.c to include a backslash,
but spot_dist.c seems to be untouched the last 3 years, so I don't
know if it's my fault.




More information about the grass-dev mailing list