On Tuesday 16 May 2006 16:07, Mircea Bardac wrote: > I have a feeling there's something fishy in the flex Arch package. > > Could anyone tell me what's wrong in the attached example (which is a > copy-paste from the documentation *). > > The output: > $ make > gcc -lfl -o rez lex.yy.c > /tmp/ccK1yJvZ.o: In function `main': > lex.yy.c:(.text+0x1795): multiple definition of `main' > /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../libfl.a(libmain.o):: first > defined here > /usr/bin/ld: Warning: size of symbol `main' changed from 27 > in /usr/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../libfl.a(libmain.o) to 66 > in /tmp/ccK1yJvZ.o > /tmp/ccK1yJvZ.o: In function `yylex': > lex.yy.c:(.text+0x3c7): undefined reference to `yywrap' > /tmp/ccK1yJvZ.o: In function `input': > lex.yy.c:(.text+0xd2c): undefined reference to `yywrap' > collect2: ld returned 1 exit status > make: *** [rez] Error 1 > > * http://www.gnu.org/software/flex/manual/html_chapter/flex_5.html > > Rebuilding flex shows: > ... > patching file flex.skl > Reversed (or previously applied) patch detected! Skipping patch. > 1 out of 1 hunk ignored -- saving rejects to file flex.skl.rej > patching file gen.c > Reversed (or previously applied) patch detected! Skipping patch. > 1 out of 1 hunk ignored -- saving rejects to file gen.c.rej > ... > checking for yywrap in -lfl... yes > ... > > > Does anyone know what's wrong with it? > I think its a problem with the makefile/make, because manually compiling works fine:
flex t0.lex gcc -lfl -o foo lex.yy.c I'm a bit sleepy and also bad with makefiles ;) so if you cant find it in a few hrs, poke me and I'll do some searching for you. But if you find out soon enough, please post back as to what the problem with makefile was and how you solved it. -- Vinay S Shastry _______________________________________________ arch mailing list [email protected] http://www.archlinux.org/mailman/listinfo/arch
