【发布时间】:2019-02-24 13:06:59
【问题描述】:
我从 Github https://github.com/coreos/grub 克隆了 grub,但是它无法编译并给出错误。错误似乎很明显,但关键是上游代码没有编译。我做错了什么吗?
我做了以下事情来编译:
./autogen.sh
./configure --target=x86_64 --with-platform=efi
make
我得到这个错误:
grub_script.yy.c: In function ‘yy_fatal_error’:
grub_script.yy.c:19:22: error: statement with no effect [-Werror=unused-value]
#define fprintf(...) 0
^
grub_script.yy.c:2367:2: note: in expansion of macro ‘fprintf’
fprintf( stderr, "%s\n", msg );
^
cc1: all warnings being treated as errors
Makefile:35746: recipe for target 'normal_module-grub_script.yy.o' failed
make[3]: *** [normal_module-grub_script.yy.o] Error 1
make[3]: Leaving directory '/tmp/grub-2.02/grub-core'
Makefile:23531: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/tmp/grub-2.02/grub-core'
Makefile:10904: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/grub-2.02'
Makefile:3130: recipe for target 'all' failed
make: *** [all] Error 2
我尝试使用 gcc 4.8,5 和 7,但同样的错误。我的主机是 Ubuntu-18 64 位。
【问题讨论】:
-
你是否已经向上游询问过这个问题?
-
@Jens :是的,在提出这个问题之前,我还在 GRUB 的邮件线程中报告了这一点。到目前为止没有收到任何回复。
-
这看起来像一个非常古老的 grub 叉子。实际上游是否也存在问题:git.savannah.gnu.org/git/grub.git?我在lists.gnu.org/mailman/listinfo/bug-grub 或lists.gnu.org/mailman/listinfo/grub-devel 上都没有看到任何关于此主题的明显报告 - 您将报告发送到哪里?