I am trying to build gzip for an embedded platform on a Linux machine. I downloaded the latest gzip distribution from here. Then, make requires first to run the configure program in order to tailor a Makefile for the specific target.
So I run configure and get some error messages. The problem seems to be a combination of a few things. Our compiler version is called e-gcc, so I used the following line, and got this error:
~/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.
Obviously, C compiled programs cannot run, b/c it is cross-compiler. The message say I have to use the --host option, but the problem is that we don’t really have a defined name in gcc. However, I tried:
./configure CC=e-gcc --host=epiphany
and the error received is:
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
Last thing, I tried cheating and setting the host to arm as it is closest in spirit to our architecture. The configuration went much further, but eventually failed as well with the following message:
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.
I am now pretty clueless on how to continue. Any suggestions?
Did you try running with the
SKIP_RMDIR_CHECK=yes
directive?