Re: [q-lang-users] CVS head failed to build, flex yytext_ptr problems
Brought to you by:
agraef
From: Peter M. <pet...@wa...> - 2006-05-18 08:28:49
|
Albert Graef wrote: > Peter Minten wrote: >> This works. However when I removed the qclex.c file (which was in the >> archive) and ran make again to recreate the file it fails in exactly >> the same way as before (not suprisingly as there is no difference >> between the 7.1rc2 qclex.l file and the one in CVS HEAD). > > Ok, so we know for sure now that it's a flex compatibility issue. > > The necessary change apparently is to move all the routines which use > unput to the first %{ %} code section of the Lex source. Unfortunately, > that doesn't work with older Flex versions. Stupid. :( > > I've attached a patch which I *think* should make qmlex.l compile, > according to the little documentation that I have about this "feature" > of the new flex version. Could you please try whether that works for you? ~/Desktop/q-7.1/src$ make /bin/sh ../ylwrap qmlex.l lex.yy.c qmlex.c -- flex -I if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../libltdl -DYEAR='"2006"' -DSYSINFO='"i686-pc-linux"' -DQPATH='".:/usr/local/share/q/lib:/usr/local/lib/q"' -DQEXEC='"/usr/local/bin/q"' -DLIBTOOL='"/usr/local/lib/q/libtool"' -DCC='"gcc"' -g -O2 -MT libglobs_a-qmlex.o -MD -MP -MF ".deps/libglobs_a-qmlex.Tpo" -c -o libglobs_a-qmlex.o `test -f 'qmlex.c' || echo './'`qmlex.c; \ then mv -f ".deps/libglobs_a-qmlex.Tpo" ".deps/libglobs_a-qmlex.Po"; else rm -f ".deps/libglobs_a-qmlex.Tpo"; exit 1; fi qmlex.c:1396: warning: conflicting types for 'yyunput' qmlex.c:1396: error: static declaration of 'yyunput' follows non-static declaration qmlex.l:287: error: previous implicit declaration of 'yyunput' was here qmlex.c:1411: error: static declaration of 'input' follows non-static declaration qmlex.l:202: error: previous implicit declaration of 'input' was here qmlex.l:669: error: static declaration of 'initbuf' follows non-static declaration qmlex.l:343: error: previous implicit declaration of 'initbuf' was here qmlex.l:674: error: conflicting types for 'addbuf' qmlex.l:674: note: an argument type that has a default promotion can't match an empty parameter name list declaration qmlex.l:298: error: previous implicit declaration of 'addbuf' was here make: *** [libglobs_a-qmlex.o] Error 1 Greetings, Peter |