2014-05-01 37 views
2

构建最新的grub2(2.00)时出现此错误。grub_script.yy.c:2354:13:错误:'yy_fatal_error'已定义但未使用

我试图在Makefile加入-Wno-unused-functionHOST_CFLAGSHOST_CPPFLAGSTARGET_CPPFLAGSTARGET_CFLAGS。我甚至尝试删除该功能,而make正在运行!

不幸的是,错误依然存在。

+0

请列出版本:flex,bison,automake,autoconf。操作系统也不会伤害到知道。 – unixsmurf

+0

Ubuntu 13.10 liveusb与freetype-2.5.3,bison-3.0,grub-2.00,libfreetype6_2.5.2-1,flex-2.5.39,libfreetype6-dev_2.5.2-1和m4- 1.4.17。 –

回答

2

你见过this

The latest flex makes the GRUB-2.00 build fail. I can work around the issues with --disable-werror , but grub-core/script/yylex.l causes two warnings that do not work with -Werror.

./grub-core/script/yylex.l: At top level: grub_script.yy.c:2351:13: error: 'yy_fatal_error' defined but not used

This can be fixed by removing #define YY_FATAL_ERROR(msg) in yylex.l .

但是,根据this后这似乎已经修复。

从网络上的信息判断,您要么切换到grub 2.02,要么尝试更旧版本的flex

+0

谢谢,我认为这是提交(来自邮件列表):http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9cc836a27be4a95f6f7bfd5b6bc099801645c0ea –