2

我已经下载了 expect5.4。我正在尝试为运行精简版 linux 的 ARM(PandaBoard) 交叉编译它。

在配置的初始设置中,我尝试

Shell$ ./configure --host=ARM
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for correct TEA configuration... ok (TEA 3.9)
configure: configuring expect 5.45
checking for Tcl configuration... found /home/user1/scripts/tcl8.6.0/unix/tclConfig.sh
checking for existence of /home/user1/scripts/tcl8.6.0/unix/tclConfig.sh... loading
configure: --prefix defaulting to TCL_PREFIX /usr/local
configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr/local
checking for ARM-gcc... /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc accepts -g... yes
checking for /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... /home/user1/toolchain/toolchain/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for ARM-ranlib... no
checking for ranlib... ranlib
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
..
.. 
..
..
..
checking for openpty... no
checking for openpty in -lutil... yes
checking if running Sequent running SVR4... no
checking build system type... i686-pc-linux-gnu
checking host system type... Invalid configuration `ARM': machine `ARM' not recognized
configure: error: /bin/bash tclconfig/config.sub ARM failed

更新: 在使用 ./configure --host=arm 编译时,我现在得到的错误是

checking for sysconf... yes
checking for strftime... yes
checking for strchr... yes
checking for timezone... yes
checking for siglongjmp... yes
checking for memcpy... yes
checking if WNOHANG requires _POSIX_SOURCE... configure: error: Expect can't be cross compiled

它能够选择 arm-gcc 但由于某种原因它失败了。

4

2 回答 2

1

使用(小写)你会更进一步--host=arm,但不多:expect 只是不想被交叉编译。克服这一点需要对configure.in. 如果您只想交叉编译,那么对它们进行处理可能是合理expect的,但如果还有很多其他东西,您最好设置一些可以运行已编译二进制文件的环境(scratchbox或类似的东西)。

于 2013-01-27T17:52:04.800 回答
0

Expect(版本 = 5.45.4)在buildroot 2019.11中可用,并且支持 PandaBoard。

你可以

  1. 从项目中下载“buildroot 2019.11”。
  2. 提取它
  3. make pandaboard_defconfig在里面跑buildroot-folder
  4. 由于依赖关系,运行make menuconfig并启用TCL(-> 目标包 -> 解释器语言和脚本)然后(-> 目标包 -> 解释器语言和脚本)expect

  5. 运行make以构建整个事物并从 output/build/expect文件夹中获取可执行文件

于 2019-12-20T09:36:31.047 回答