构建最新的grub2(2.00)时出现此错误。grub_script.yy.c:2354:13:错误:'yy_fatal_error'已定义但未使用
我试图在Makefile
加入-Wno-unused-function
既HOST_CFLAGS
,HOST_CPPFLAGS
,TARGET_CPPFLAGS
和TARGET_CFLAGS
。我甚至尝试删除该功能,而make
正在运行!
不幸的是,错误依然存在。
构建最新的grub2(2.00)时出现此错误。grub_script.yy.c:2354:13:错误:'yy_fatal_error'已定义但未使用
我试图在Makefile
加入-Wno-unused-function
既HOST_CFLAGS
,HOST_CPPFLAGS
,TARGET_CPPFLAGS
和TARGET_CFLAGS
。我甚至尝试删除该功能,而make
正在运行!
不幸的是,错误依然存在。
你见过this?
The latest
flex
makes theGRUB-2.00
build fail. I can work around the issues with--disable-werror
, butgrub-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)
inyylex.l
.
但是,根据this后这似乎已经修复。
从网络上的信息判断,您要么切换到grub 2.02
,要么尝试更旧版本的flex
。
谢谢,我认为这是提交(来自邮件列表):http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9cc836a27be4a95f6f7bfd5b6bc099801645c0ea –
请列出版本:flex,bison,automake,autoconf。操作系统也不会伤害到知道。 – unixsmurf
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。 –