首页 > 解决方案 > 为 Sparc 交叉编译编译 OpenBIOS

问题描述

我正在尝试编译从 github 存储库下载的 OpenBIOS 应用程序

git clone https://github.com/openbios/openbios.git

但是我遇到以下错误消息

grct@grct-Dell-DM061:~/openbios$ ./config/scripts/switch-arch sparc32 sparc64 amd64
Configuring OpenBIOS on amd64 for sparc32 sparc64 amd64
Initializing build tree /home/grct/openbios/obj-sparc32...ok.
Creating target config.mak...ok.
Creating target rules.mak...ok.
Creating config files...ok.
Initializing build tree /home/grct/openbios/obj-sparc64...ok.
Creating target config.mak...ok.
Creating target rules.mak...ok.
Creating config files...ok.
Initializing build tree /home/grct/openbios/obj-amd64...ok.
Creating target config.mak...ok.
Creating target rules.mak...ok.
Creating config files...ok.
grct@grct-Dell-DM061:~/openbios$ make
/usr/bin/xsltproc
Building OpenBIOS for sparc32 sparc64 amd64
Building...
ok.
ok.
error:
 HOSTCC host/kernel/stack.o
 HOSTCC forthstrap
  GEN   bootstrap.dict
  GEN   openbios.dict
  GEN   openbios-amd64.dict
  GEN   openbios-unix.dict
  CC    target/arch/unix/unix.o
/home/grct/openbios/arch/unix/unix.c: In function ‘read_from_disk’:
/home/grct/openbios/arch/unix/unix.c:420:2: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]
  read(diskemu, buf, size);
  ^~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
rules.mak:209: recipe for target 'target/arch/unix/unix.o' failed
make[1]: *** [target/arch/unix/unix.o] Error 1
make[1]: Leaving directory '/home/grct/openbios/obj-amd64'
Makefile:19: recipe for target 'build' failed
make: *** [build] Error 1

我不知道如何克服这个错误?感谢我能得到的任何帮助

谢谢 :)

标签: makefile

解决方案


Try finding and removing -Werror from the makefiles.


推荐阅读