This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

compiling gcc 2.8.1 under cygwin


Hi -- I'm trying to compile gcc 2.8.1 under cygwin 1.1 with gcc 2.95.2.
The configure script recognizes the host as i686-pc-cygwin and builds most
of the stage1 compiler without flaws. A problem does occur during the
compilation of enquire.c using xgcc:

-------------------------------

./xgcc -B./  -DIN_GCC    -g -I./include     -DNO_MEM -DNO_LONG_DOUBLE_IO
-O
  -DSYS_FLOAT_H_WRAP=$SYS_FLOAT_H_WRAP \
  -I. -c ./enquire.c
./enquire.c:395: stdio.h: No such file or directory
./enquire.c:406: sys/types.h: No such file or directory
./enquire.c:407: signal.h: No such file or directory
./enquire.c:408: setjmp.h: No such file or directory
./enquire.c:505: parse error before `lab'
./enquire.c:505: warning: data definition has no type or storage class
./enquire.c: In function `setmode':
./enquire.c:610: `stderr' undeclared (first use in this function)
./enquire.c:610: (Each undeclared identifier is reported only once
./enquire.c:610: for each function it appears in.)
./enquire.c: In function `xmalloc':
./enquire.c:635: `stderr' undeclared (first use in this function)
./enquire.c: In function `main':
./enquire.c:695: `stderr' undeclared (first use in this function)
./enquire.c: In function `fprop':
./enquire.c:2337: `stderr' undeclared (first use in this function)

-------------------------------

This appears to be a common problem:

http://gcc.gnu.org/ml/gcc-bugs/1998-03/msg00379.html
http://www.cygwin.com/ml/cygwin/1998-05/msg00444.html

both describe the same problem (but using cygwin b19). And in both
instances Mumit Khan recommends reconfiguring with the following command:

% configure --prefix=/Cygnus/B19 \
    --exec-prefix=/Cygnus/B19/H-i386-cygwin32 \
    --host=i386-cygwin32

I'm not sure what Mumit's motivation here was, or how this applies the
newer version of cygwin I'm using. Could someone point me in the right
direction?

btw, my reasons for compiling gcc 2.8.1 are somewhat tortured: I have a
program I need to compile that's written in both ada 95 and c++. I can
compile the ada sources using gnat 3.12 and the c++ source using the gcc
2.95.2 compiler that comes with cygwin.  The problem arises when I try
linking the object files with g++: there are unresolved dependences in
libgnat.a that g++ can't find in the newer version of libgcc.a (libgnat.a 
was originally linked against the libgcc.a that came with gcc 2.8.1). I am
convinced that the only way around this is to compile the c++ sources with
gcc 2.8.1 (the same version that gnat 3.12 uses) and link with the 2.8.1
version of g++.

Thanks much for your help.

-Mike Copenhafer



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]