Cannot build package due to missing GCC headers in Buildroot (stdio.h)

743 Views Asked by At

Recently, I updated the Buildroot directory from 2019.11 to 2022.2 in order to build for a new board (RPi4B Rev1.5) and access the updated Linux kernel and headers. Unfortunately, I have been unable to build due to missing headers for the SWUpdate package.

An extract of the error is below. The full log can be found at this link (as it is long).

 CC      tools/swupdate-client.o
ipc/network_ipc-if.c:8:10: fatal error: stdio.h: No such file or directory
8 | #include <stdio.h>
  |          ^~~~~~~~~
ipc/network_ipc.c:9:10: fatal error: stdio.h: No such file or directory
9 | #include <stdio.h>
  |          ^~~~~~~~~
compilation terminated.
In file included from /home/haelyons/project_folder/buildroot/output/host/lib/gcc/arm- 
buildroot-linux-gnueabihf/10.3.0/include-fixed/syslimits.h:7,
             from /home/haelyons/project_folder/buildroot/output/host/lib/gcc/arm-buildroot- 
linux-gnueabihf/10.3.0/include-fixed/limits.h:34,
             from parser/parse_external.c:10:
/home/haelyons/project_folder/buildroot/output/host/lib/gcc/arm-buildroot-linux- 
gnueabihf/10.3.0/include-fixed/limits.h:195:15: fatal error: limits.h: No such file or 
directory

Essentially, as this is a package included with Buildroot, I am not sure if the issue is with my installation of GCC, or with the package itself referencing the incorrect folder. If possible, I would greatly appreciate some pointers in the right direction such as more tests that I could perform to diagnose this. Thanks, H.

1

There are 1 best solutions below

0
On BEST ANSWER

After more research, it turns out this was an issue with the configuration path assigned within the Buildroot config. It was referring to the RPi3 configuration, which required a different kernel and GCC version. The fix involved the following:

make nconfig
# Navigate to: Target Packages > System Tools > SWUpdate Config Path
# Update the patch to the new board's config - BR2_EXTERNAL=<path>
make -C savedefconfig BR2_DEFCONFIG=../<config path>