gpt4 book ai didi

linux - 如何修复此 libgcrypt 交叉编译错误?

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

我正尝试在带有 imx6 的板上为 ElinOS 交叉编译 GPG。我在编译 libgcrypt 时遇到问题。首先,这是我的工作:

export PATH=/opt/elinos/cdk/arm/v7hf/glibc/bin:$PATH 
./configure --host=arm-unknown-linux-gnueabihf --build=i686-pc-linux-gnu
make all

配置部分没有显示错误或警告,但 make 显示如下:

hwf-arm.c:31:3: error: #error Module build for wrong CPU.
# error Module build for wrong CPU.
^
hwf-arm.c: In function 'get_hwcap':
hwf-arm.c:126:26: error: 'AT_HWCAP' undeclared (first use in this function)
if (auxv.a_type == AT_HWCAP)
^
hwf-arm.c:126:26: note: each undeclared identifier is reported only once for each function it appears in
hwf-arm.c:132:26: error: 'AT_HWCAP2' undeclared (first use in this function)
if (auxv.a_type == AT_HWCAP2)
^
In file included from hwf-arm.c:27:0:
hwf-arm.c: In function 'detect_arm_at_hwcap':
hwf-arm.c:159:23: error: 'arm_features' undeclared (first use in this function)
for (i = 0; i < DIM(arm_features); i++)
^
g10lib.h:96:24: note: in definition of macro 'DIM'
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
^
hwf-arm.c: In function 'detect_arm_proc_cpuinfo':
hwf-arm.c:250:23: error: 'arm_features' undeclared (first use in this function)
for (i = 0; i < DIM(arm_features); i++)
^
g10lib.h:96:24: note: in definition of macro 'DIM'
#define DIM(v) (sizeof(v)/sizeof((v)[0]))

第一个错误将我引向这部分代码:

#if !defined (__arm__) && !defined (__aarch64__)
# error Module build for wrong CPU.
#endif

知道这是从哪里来的吗?看起来像是配置问题,但我不确定现在该去哪里查看。

最佳答案

config.log 文件中,CC 设置正确:CC='arm-unknown-linux-gnueabihf-gcc'

但我需要在 make 命令中指定它。因此,我不得不使用 make all CC=arm-unknown-linux-gnueabihf-gcc,而不是简单地使用不起作用的 make all

关于linux - 如何修复此 libgcrypt 交叉编译错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54629167/

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