gpt4 book ai didi

embedded - 如何交叉构建GZIP?

转载 作者:行者123 更新时间:2023-12-02 15:39:15 26 4
gpt4 key购买 nike

我正在尝试为 Linux 机器上的嵌入式平台构建 gzip。我从 here 下载了最新的 gzip 发行版.然后,make 需要先运行configure 程序,以便为特定目标定制一个Makefile

所以我运行 configure 并收到一些错误消息。问题似乎是几件事的结合。我们的编译器版本称为 e-gcc,所以我使用了以下行,但得到了这个错误:

~/Projects/gzip-1.4$ ./configure CC=e-gcc
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... e-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/home/xyz/Projects/gzip-1.4':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

很明显,C编译的程序是跑不了的,b/c是交叉编译的。消息说我必须使用 --host 选项,但问题是我们在 gcc 中并没有真正定义的名称。但是,我尝试过:

./configure CC=e-gcc --host=epiphany

收到的错误是:

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 a BSD-compatible install... /usr/bin/install -c

blah blah blah

checking build system type... x86_64-unknown-linux-gnu
checking host system type... Invalid configuration `epiphany': machine `epiphany' not recognized
configure: error: /bin/bash build-aux/config.sub epiphany failed

最后,我尝试作弊并将主机设置为 arm,因为它在精神上最接近我们的架构。配置更进一步,但最终也失败并显示以下消息:

checking for GNU libc compatible realloc... no
checking for rmdir... no
configure: error: in `/home/xyz/Projects/gzip-1.4':
configure: error: Your system lacks the rmdir function.
Please report this, along with the output of "uname -a", to the
bug-coreutils@gnu.org mailing list. To continue past this point,
rerun configure with SKIP_RMDIR_CHECK=yes.
E.g., ./configure SKIP_RMDIR_CHECK=yes
See `config.log' for more details.

我现在完全不知道如何继续。有什么建议吗?

最佳答案

嵌入式平台是否有适合命令行 gzip 程序的环境?如果您想从为嵌入式平台编写的软件进行 gzip 压缩和解压缩,那么您应该考虑 zlib相反。

关于embedded - 如何交叉构建GZIP?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10979264/

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