grub2 compilation error on CentOS 4.2
I was trying to compile today's grub2 CVS version, and ran into the following problem:
host% gmake
gcc [...] -c -o grub_emu-normal_lexer.o normal/lexer.c normal/lexer.c: In function `grub_script_yylex':normal/lexer.c:89: error: called object is not a function normal/lexer.c:90: error: syntax error before "return" normal/lexer.c:92: error: called object is not a function normal/lexer.c:93: error: syntax error before '{' token
This appears to be due to a rather unfortunate preprocessor macro in grub_script.tab.h:
host% grep define.if grub_script.tab.h
#define if 258
I'm not sure what's going on, but my version of yacc is generating that output from grub2/normal/parser.y.
host% rpm -qf /usr/bin/yacc
byacc-1.9-28
-- kolya
Quoted 14 lines
I was trying to compile today's grub2 CVS version, and ran into the following problem:
host% gmake
gcc [...] -c -o grub_emu-normal_lexer.onormal/lexer.cnormal/lexer.c: In function `grub_script_yylex':normal/lexer.c:89: error: called object is not a functionnormal/lexer.c:90: error: syntax error before "return"normal/lexer.c:92: error: called object is not a functionnormal/lexer.c:93: error: syntax error before '{' tokenThis appears to be due to a rather unfortunate preprocessor macro in
grub_script.tab.h:
Quoted 8 lines
host% grep define.if
grub_script.tab.h
#define if 258I'm not sure what's going on, but my version of yacc is generating that output from grub2/normal/parser.y.
host% rpm -qf
/usr/bin/yacc
byacc-1.9-28
berkley yacc doesn't work.
use bison.
configure.ac should be changed to enforce use of bison imho.
Quoted 9 lines
-- kolya
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Nickolai Zeldovich <[email protected]> writes:
Hi Nickolai,
Quoted 14 lines
I was trying to compile today's grub2 CVS version, and ran into the following problem:
host% gmake
gcc [...] -c -o grub_emu-normal_lexer.onormal/lexer.cnormal/lexer.c: In function `grub_script_yylex':normal/lexer.c:89: error: called object is not a functionnormal/lexer.c:90: error: syntax error before "return"normal/lexer.c:92: error: called object is not a functionnormal/lexer.c:93: error: syntax error before '{' tokenThis appears to be due to a rather unfortunate preprocessor macro in
grub_script.tab.h:
Quoted 8 lines
host% grep define.if
grub_script.tab.h
#define if 258I'm not sure what's going on, but my version of yacc is generating that output from grub2/normal/parser.y.
host% rpm -qf
/usr/bin/yacc
byacc-1.9-28
Thanks for your report!
You have to use bison. The autoconf test yet has to be changed to enforce that.
--
Marco