gpt4 book ai didi

linux - binutils 为 readelf 报错

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:18:16 25 4
gpt4 key购买 nike

当我运行 make binutils/readelf 时,出现以下错误:

In file included from readelf.c:43:0:
sysdep.h:23:25: fatal error: alloca-conf.h: No such file or directory
#include "alloca-conf.h"

我缺少什么依赖项?我如何只构建和编译 readelf 而无需制作其余的 binutils?

最佳答案

实际发生的情况是您没有Makefile 或至少没有定义binutils/readelf 目标。但是由于有一个 binutils/readelf.c 文件,make 仍然运行并尝试使用其隐式模式规则编译和链接 binutils/readelf...但失败了,因为这个源文件没有相应的配置是无法构建的。

这只是为了添加更多细节。长话短说,按照评论中的建议运行 ./configuremake 并收集生成的 readelf。比尝试从基于 autotools 的项目中分离出一个单独的项目要容易得多。您将 -I 添加到 CFLAGS 以查找 alloca-conf.h,您将遇到另一个类似的问题。

关于linux - binutils 为 readelf 报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47850549/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com