[GRASS5] Re: GRASS 5.1 compile error

GFernandez-Victorio at IGAE.minhac.es GFernandez-Victorio at IGAE.minhac.es
Thu May 22 13:22:07 EDT 2003


On Wed, 21 May 2003, Martin Pokorny wrote:
> >> > 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:
[...]
> I also encountered this same problem yesterday on my Debian system. I
> found a way around the problem by modifying lib/db/sqlp/lex.l from
> CVS. It turns out that the lex.yy.c file generated from lex.l defines
> 'YY_FLUSH_BUFFER' at one point, and then undefines it later on, before
> its use in the 'yyerror' function. I just manually expanded the macro
> in lex.l, and now all is well AFAICT. I'm too lazy right now to
> produce a diff, but here's a copy of my lex.l---look around line 233,
> I've commented out the original, and inserted my one line
> modification.

Ok. I've contacted Debian flex mantainer, and he has told me
that the new direction flex is taking is to incorporate new
functionality at the expense of POSIX or backward compatibility. The
new scanners are reentrant, and do not pollute the global name
space, and thus macros that used to be available to user code are no
longer present. 

It seems that flex-old in Sid (Debian unstable) provides the same code 
as stable flex did, with a few bug fixes.

As I don't understand the code, I'm not able to know if Martin's 
modiffication is correct, but if it works in others distributions, it
would be a better solution than using flex-old.

Comments???


Gonzalo




More information about the grass-dev mailing list