binutils 为 readelf 报错
binutils make error for readelf
当我 运行 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"
我缺少什么依赖项?我如何在不制作其余 binutils 的情况下构建和编译 readelf?
实际发生的情况是您没有 Makefile
或至少没有定义 binutils/readelf
目标。但是因为有一个 binutils/readelf.c
文件,make still 运行 并尝试编译 link binutils/readelf
使用它的隐式模式规则......但失败了,因为这个源文件不能没有相应的配置构建。
这只是为了添加更多细节。长话短说,按照评论中的建议 运行 ./configure
和 make
并收集结果 readelf
。比尝试从基于 autotools 的项目中分离出一个单独的项目要容易得多。你将 -I
添加到 CFLAGS
以找到 alloca-conf.h
,你只会 运行 进入另一个类似的问题。
当我 运行 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"
我缺少什么依赖项?我如何在不制作其余 binutils 的情况下构建和编译 readelf?
实际发生的情况是您没有 Makefile
或至少没有定义 binutils/readelf
目标。但是因为有一个 binutils/readelf.c
文件,make still 运行 并尝试编译 link binutils/readelf
使用它的隐式模式规则......但失败了,因为这个源文件不能没有相应的配置构建。
这只是为了添加更多细节。长话短说,按照评论中的建议 运行 ./configure
和 make
并收集结果 readelf
。比尝试从基于 autotools 的项目中分离出一个单独的项目要容易得多。你将 -I
添加到 CFLAGS
以找到 alloca-conf.h
,你只会 运行 进入另一个类似的问题。