GNOME Bugzilla – Bug 507344
Fails to build with flex-2.5.34
Last modified: 2009-10-28 19:27:22 UTC
Please describe the problem: Flex-2.5.34 gets confused: libIDL 0.8.9 configuration complete C Preprocessor: "gcc -E" Standard input supported. bison -y -d -v 2>/dev/null ./parser.y touch stamp-parser test -f y.tab.h && mv -f y.tab.h parser.h || touch parser.h flex -8 -t ./lexer.l | sed -e 's/yy/__IDL_/g' >lexer.c ./lexer.l:116: bad character: % ./lexer.l:116: unknown error processing section 1 ./lexer.l:116: unknown error processing section 1 ./lexer.l:116: bad character: 5 ./lexer.l:116: bad character: 0 ./lexer.l:116: bad character: 0 ./lexer.l:116: bad character: 0 test -f y.tab.c && mv -f y.tab.c parser.c || touch parser.c This has the unfortunate result that lexer.c does not contain anything from lexer.l. so the link fails with /bin/sh ./libtool --mode=link gcc -O2 -o tstidl tstidl.o libIDL-2.la -lglib-2.0 gcc -O2 -o .libs/tstidl tstidl.o ./.libs/libIDL-2.so /usr/lib/libglib-2.0.so ./.libs/libIDL-2.so: undefined reference to `__IDL_cur_token_line' ./.libs/libIDL-2.so: undefined reference to `__IDL_lex_cleanup' ./.libs/libIDL-2.so: undefined reference to `__IDL_prev_token_line' ./.libs/libIDL-2.so: undefined reference to `__IDL_lex' ./.libs/libIDL-2.so: undefined reference to `__IDL_in' ./.libs/libIDL-2.so: undefined reference to `__IDL_lex_init' collect2: ld returned 1 exit status Steps to reproduce: 1. Try to use flex-2.5.34 as your flex. 2. configure ; make 3. Actual results: As in the summary. Expected results: A successful build would be nice ;-) Does this happen every time? Yes. Other information: Will attach a patch as soon as I've filed this.
Created attachment 102158 [details] [review] Patch to change %p to %pointer Works for me.
Actually, a better fix is to remove this line. It seems that flex-2.5.34 no longer silently ignores lex table size declarations. Flex bug 1860773 has already been raised. I'll leave this open so that someone can decide whether the '%p' is really needed.
Looks like this works with flex 2.5.35 at least. Close this?
Seems a good idea: treat it as yet another flex bug. I'll leave you to decide which of the possible resolutions is most appropriate.
Ok. Closing as a flex bug then.