2014-05-01 15 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 –