Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opensbi failed to build #365

Open
ElyesH opened this issue Jul 14, 2024 · 2 comments
Open

opensbi failed to build #365

ElyesH opened this issue Jul 14, 2024 · 2 comments

Comments

@ElyesH
Copy link

ElyesH commented Jul 14, 2024

I've used c23 dialect to build test coreboot and got the following error:
CC ramstage/arch/riscv/opensbi.o In file included from 3rdparty/opensbi/include/sbi/fw_dynamic.h:46, from src/arch/riscv/opensbi.c:8: 3rdparty/opensbi/include/sbi/sbi_types.h:47:33: error: two or more data types in declaration specifiers 47 | typedef int bool; | ^~~~ 3rdparty/opensbi/include/sbi/sbi_types.h:47:1: error: useless type name in empty declaration [-Werror] 47 | typedef int bool; | ^~~~~~~ cc1: all warnings being treated as errors make[2]: *** [Makefile:423: /cb-build/coreboot-gerrit.0/gcc/EMULATION_QEMU_RISCV_RV64_/ramstage/arch/riscv/opensbi.o] Error 1 make[2]: Leaving directory '/home/coreboot/node-root/workspace/coreboot-gerrit'
https://qa.coreboot.org/job/coreboot-gerrit/260415/testReport/junit/(root)/gcc/EMULATION_QEMU_RISCV_RV64_/

Thx

@tswaehn
Copy link

tswaehn commented Aug 16, 2024

what are the make parameters that make opensbi fail to build?

@ElyesH
Copy link
Author

ElyesH commented Sep 15, 2024

The problem is that you unconditionally typedef bool in this file opensbi/include/sbi/sbi_types.h!
C23 already have bool .

Please use something like :
#if __STDC_VERSION__ <= 201710L typedef _Bool bool; #endif

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants