opensbi failed to build

Open
#365 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Reproduce the C23 build failure for the RISC-V target and start with 3rdparty/opensbi/include/sbi/sbi_types.h, especially the typedef reported at line 47. Trace how src/arch/riscv/opensbi.c includes that header, then verify that the OpenSBI build completes successfully with the C23 dialect without introducing warnings treated as errors.

Written by the indexing model from the issue text.

Description

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

Dominant language
C
Stars
1.6k
Forks
734
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from riscv-software-src/opensbi

All issues in riscv-software-src/opensbi

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.