如何交叉编译Expect for ARM [英] How to cross compile Expect for ARM

查看:44
本文介绍了如何交叉编译Expect for ARM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何交叉编译 Expect for ARM?

How does one cross-compile Expect for ARM?

在主机 Ubuntu 机器上从源代码构建它绝对没有问题.但是如果你尝试交叉编译它,configure 脚本不断地给出以下错误:

It is absolutely no problem to build it from source on a host Ubuntu machine. But if you try to cross compile it, the configure script constantly gives the following error:

checking if WNOHANG requires _POSIX_SOURCE... configure: error: Expect can't be cross compiled

似乎有人在这里找到了方法(但他没有详细说明):

There seems to be someone who found out how to do it here (but he doesn't elaborate):

我还从这里获取了源代码和补丁:

I also took the source and patches from here:

但即使成功应用补丁,也收到同样的错误!

But received the same error even when patches were successfully applied!

我真的很感谢这里的帮助.

I'd really appreciate some help here.

推荐答案

那些补丁所做的是遵循您提供的第一个链接中的解释方法:找到所有 AC_MSG_ERROR([Expect can't被交叉编译]) 行在 configure.in 中,并用硬编码行替换它们,该行对正确"答案进行编码.

What those patches are doing is following the methodology of the explanation from the first link you provide: Find all of the AC_MSG_ERROR([Expect can't be cross compiled]) lines in configure.in, and replace them with a hard-coded line that encodes the "right" answer.

所以,首先要做的是:如果您在应用补丁后仍然遇到该错误,那么补丁一定是漏掉了一个;你应该找到它并修复它.

So, there's the first thing to do: If you're still getting that error after applying the patches, then the patch must have missed one; you should find it and fix it too.

另一件要检查的事情是是否已插入"——您是否运行相关的自动工具以在修补 configure.in 后正确重新生成 configure 文件代码>文件?看起来这些补丁只是补丁configure.in,所以如果你不进行重新生成,你将不会改变实际运行的任何东西.

Another thing to check is along the lines of "is it plugged in" -- did you run the relevant autotools to properly regenerate the configure file after patching the configure.in file? It looks like those patches only patch configure.in, so if you didn't do the regeneration you won't have changed anything that actually runs.

一旦您解决了直接错误,还有一点是您找到的补丁适用于 TimeSys Linux(根据名称),这可能与您的系统匹配,也可能不匹配——特别是,甚至可能不匹配适用于 ARM 系统.(我看到 TimeSys 现在支持 ARM,但我对它们的熟悉是针对 PowerPC.)由于它用硬编码答案代替了自动测试,因此这些答案很容易出错.我建议检查补丁中更改的各行,以确认它们硬编码的答案实际上是正确的.

Once you get past the immediate error, there's also the point that the patches that you found are for TimeSys Linux (as per the names), which may or may not match your system -- and, in particular, may not even be for an ARM system. (I see that TimeSys now supports ARM, but my familiarity with them is for PowerPC.) Since it's replacing automatic tests with hard-coded answers, those answers could easily be wrong. I'd recommend checking the various lines changed in the patches to confirm that the answers they hard-code in are actually correct.

这篇关于如何交叉编译Expect for ARM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆