[GRASSLIST:4206] Re: compiling GRASS5pre5 on Cygwin gcc error

Thomas Dewez thomas.dewez at brunel.ac.uk
Fri Aug 2 16:35:16 EDT 2002


----- Original Message -----
From: "Glynn Clements" <glynn.clements at virgin.net>
To: "Thomas Dewez" <thomas.dewez at brunel.ac.uk>
Cc: "GRASS" <GRASSLIST at baylor.edu>
Sent: Friday, August 02, 2002 8:33 PM
Subject: Re: [GRASSLIST:4202] Re: compiling GRASS5pre5 on Cygwin gcc error


>
> Thomas Dewez wrote:
>
> > > If configure fails, you need to look at the file config.log for the
> > > reason. The error messages only indicate which test failed, not why
> > > the test failed.
> >
> > The config.log contains the following:
> > ---------snip--------------------------
> >
> > This file contains any messages produced by compilers while
> > running configure, to aid debugging if configure makes a mistake.
> >
> > configure:680: checking host system type
> > configure:703: checking for gcc
> > configure:807: checking whether the C compiler (gcc  ) works
> > configure:823: gcc -o conftest    conftest.c  1>&5
> > configure: failed program was:
> >
> > #line 818 "configure"
> > #include "confdefs.h"
> >
> > main(){return(0);}
> > ---------snap--------------------------
> >
> > Can you help me make sense of this?
>
> Not really. Normally you would expect gcc to generate an error message
> if it failed.
>
> I can only presume that something failed at a low level, such that gcc
> died suddenly.

I looked at the configure script around line 818 where the script broke down
and found:
-----------snip---------------------
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works""... $ac_c" 1>&6
echo "configure:807: checking whether the C compiler ($CC $CFLAGS $LDFLAGS)
works" >&5

ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross

cat > conftest.$ac_ext << EOF

#line 818 "configure"
#include "confdefs.h"

main(){return(0);}
EOF
--------------snap---------------------

What does "CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp
options" mean? This surely contains the clue as to what is going on but I am
not "C/Unix-literate" enough to understand this cryptic messag but perhaps
somebody knows...

Thanks Glynn

Thomas


>
> --
> Glynn Clements <glynn.clements at virgin.net>
>



More information about the grass-user mailing list