由于 Buildroot (stdio.h) 中缺少 GCC 标头,无法构建包
最近,我将 Buildroot 目录从 2019.11 更新到 2022.2,以便构建新板 (RPi4B Rev1.5) 并访问更新的 Linux 内核和标头。不幸的是,由于缺少 SWUpdate 包的标头,我无法构建。
错误摘录如下。完整的日志可以在此链接中找到(因为它很长)。
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
本质上,由于这是 Buildroot 中包含的软件包,我不确定问题是否出在我安装的 GCC 上,或者是软件包本身引用了不正确的文件夹。如果可能的话,我将非常感谢一些正确方向的指示,例如我可以执行更多测试来诊断此问题。谢谢,H.
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过更多研究,事实证明这是 Buildroot 配置中分配的配置路径的问题。它指的是 RPi3 配置,需要不同的内核和 GCC 版本。修复涉及以下内容:
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: