I think the problem is due to /lib/cpp being hardcoded in some of the
gcc configuration files, and I would guess that unix/linux based systems
have a /lib/cpp for historic reasons.

On cygwin however, cpp is /usr/bin/cpp, and there is no /lib/cpp .

I've just done the not so obvious workaround :
  ln -s /usr/bin/cpp /lib/cpp
and the step in which the failure occurred works fine now.

I see three ways out of this :
- setenv CPP /usr/bin/cpp
- hardcode "setenv CPP /usr/bin/cpp" in the build script on the right
  place
- change the gcc build to do its job better.

Johnny, can you try whether
  setenv CPP /usr/bin/cpp
works for you ?

        Danny

P.S. As I already said (see below) the offending code is in
     src/gcc-4.4.0/libgcc/configure. 
     This is what it looks like :

if test -z "$CPP"; then
  if test "${ac_cv_prog_CPP+set}" = set; then
  echo $ECHO_N "(cached) $ECHO_C" >&6
else
      # Double quotes because CPP needs to be expanded
    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
    do
      ac_preproc_ok=false
...



On Fri, 2009-06-12 at 20:57 +0200, Johnny Willemsen wrote:
> Hi,
> 
> We are able to compile the previous gcc version on this system without
> problems. It doesn't look like CPP is set as environment varialb.e
> 
> Johnny
> 
> > I'm guessing, but is the cygwin installation complete ?
> > src/gcc-4.4.0/libgcc/configure has a couple of lines that say :
> >       # Double quotes because CPP needs to be expanded
> >     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
> >     do
> >     ...
> > 
> > Or, is the variable CPP set to /lib/cpp in the environment ?
> > 
> >     Danny
> > 
> > On Fri, 2009-06-12 at 08:52 +0200, Johnny Willemsen wrote:
> > > I found it
> > >
> > > > -----Original Message-----
> > > > From: Danny Backx [mailto:danny.ba...@scarlet.be]
> > > > Sent: donderdag 11 juni 2009 21:47
> > > > To: jwillem...@remedy.nl
> > > > Cc: cegcc-devel@lists.sourceforge.net
> > > > Subject: Re: [Cegcc-devel] Problem compling GCC 4.4 with Cygwin
> > > >
> > > > I think the file got truncated. Can you send the complete file to
> > me in
> > > > private E-mail ? (The private copy you sent was also truncated.)
> > > >
> > > > The file I got is "only" 5524 lines long, doesn't contain the word
> > > > sanity.
> > > >
> > > >         Danny
> > > >
> > > > On Thu, 2009-06-11 at 14:12 +0200, Johnny Willemsen wrote:
> > > > > Hi,
> > > > >
> > > > > I am trying to compile GCC 4.4 with Cygwin but got the following
> > > > error
> > > > > below. Seems a path problem in the scripts. Danny, any idea?
> > > > >
> > > > > Johnny
> > > > >
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c: In function
> > `do_spec_1':
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c:5136: warning: cast
> > > > discards
> > > > > qualifier
> > > > > s from pointer target type
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c: In function
> > `give_switch':
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c:6093: warning: cast
> > > > discards
> > > > > qualifier
> > > > > s from pointer target type
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c:6099: warning: cast
> > > > discards
> > > > > qualifier
> > > > > s from pointer target type
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c: In function
> > > > `set_multilib_dir':
> > > > > /home/build/cegcc/src/gcc-4.4.0/gcc/gcc.c:7572: warning: cast
> > > > discards
> > > > > qualifier
> > > > > s from pointer target type
> > > > > configure: error: in
> > > > > `/home/build/cegcc/src/scripts/x86/gcc-bootstrap/i386-mingw
> > > > > 32ce/libgcc':
> > > > > configure: error: C preprocessor "/lib/cpp" fails sanity check
> > > > > See `config.log' for more details.
> > > > > make: *** [configure-target-libgcc] Error 1
> > > > > -----------------------------------------------------------------
> > ----
> > > > ---------
> > > > > Crystal Reports - New Free Runtime and 30 Day Trial
> > > > > Check out the new simplified licensing option that enables
> > unlimited
> > > > > royalty-free distribution of the report engine for externally
> > facing
> > > > > server and web deployment.
> > > > > http://p.sf.net/sfu/businessobjects
> > > > > _______________________________________________ Cegcc-devel
> > mailing
> > > > list Cegcc-devel@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> > > > --
> > > > Danny Backx ; danny.backx - at - scarlet.be ;
> > http://danny.backx.info
> > --
> > Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
> 
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
> 
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to