ARM的交叉编译期望

时间:2013-01-27 17:16:44

标签: linux arm cross-compiling embedded-linux expect

我已下载expect5.4。我正在尝试交叉编译它为ARM(PandaBoard)运行剥离版本的linux。

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

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,但由于某种原因它失败了。

2 个答案:

答案 0 :(得分:1)

--host=arm(小写)你会得到更多,但不是 很多:期望只是不想被交叉编译。克服这一点 需要在configure.in中进行非平凡的修改。它可能是 如果expect是你想要的唯一的东西,那就理性地对待它们 交叉编译,但如果还有很多其他的,你最好设置一些 您可以运行已编译二进制文件的环境(scratchbox或 类似的东西)。

答案 1 :(得分: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文件夹