我正在尝试gzip
在 Linux 机器上构建嵌入式平台。我从这里下载了最新的 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.
我现在对如何继续一无所知。有什么建议么?