This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Help with GCC on Cygwin
- From: Brian Dessent <brian at dessent dot net>
- To: "Balaji V. Iyer" <bviyer at ncsu dot edu>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 05 Mar 2008 14:06:23 -0800
- Subject: Re: Help with GCC on Cygwin
- References: <001501c87ec4$64451d40$33160e98@ece.ncsu.edu>
- Reply-to: gcc-help at gcc dot gnu dot org
"Balaji V. Iyer" wrote:
> ../gcc-4.0.2/configure --prefix=/home/Software_Tools/install
> --enable-languages="c"
>
> Then I did: make all install
You really should just do "make" and verify that it works first, then do
"make install".
> Now it is failing somewhere in libiberty....(below I have hte errors)
>
> Configuring in fixincludes
> configure: loading cache ./config.cache
> checking build system type... i686-pc-cygwin checking host system
> type... i686-pc-cygwin checking target system type... i686-pc-cygwin
> checking for i686-pc-cygwin-gcc... gcc checking for C compiler default
Munging the output like this really does make it a pain to try to follow
what's going on.
> Configuring in libiberty
> configure: creating cache ./config.cache checking whether to enable
> ...
> for sys/param.h... yes checking for limits.h... yes checking for
Note that libiberty's check for limits.h returned yes. This means
HAVE_LIMITS_H should be set. Verify this in config.status and config.h.
> ../../gcc-4.0.2/libiberty/regex.c:2477: warning: implicit declaration of
> function `free'
All of these 'implicit declaration' warnings are very disconcerting, it
implies that the headers are not being included due to HAVE_FOO_H not
being defined; or there is some kind of environmental problem. You
should not have any of these implicit declaration warnings at all, it is
a sign of something broken.
> gcc -c -DHAVE_CONFIG_H -g -O2 -I.
> -I../../gcc-4.0.2/libiberty/../include -W -Wall -Wtraditional -pedantic
> ../../gcc-4.0.2/libiberty/fibheap.c -o fibheap.o
> ../../gcc-4.0.2/libiberty/fibheap.c: In function `fibheap_delete_node':
> ../../gcc-4.0.2/libiberty/fibheap.c:285: error: `LONG_MIN' undeclared
> (first use in this function)
> ../../gcc-4.0.2/libiberty/fibheap.c:285: error: (Each undeclared
> identifier is reported only once
Cygwin's limits.h defines LONG_MIN. Yet the configure check said it
found a working limits.h, and HAVE_LIMITS_H should be defined, which
means fibheap.c should have included limits.h. You need to find out why
this is not working. Look at the preprocessed source (add -save-temps
or -E to the above compilation command) of the file. Look at config.h.
Look at config.status. Check that your Cygwin installation is sane by
the following testcase:
#include <limits.h>
int main(int argc, char **argv)
{
#ifndef LONG_MIN
abort();
#endif
return 0;
}
Normally none of this is an issue, you can simply "configure && make" to
build gcc in Cygwin without all these warnings.
Brian