This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Cygwin build error


On 27 April 2006 20:15, Ernie Coskrey wrote:

> I ran into the following problem building the latest cygwin snapshot:
> 
> configure: loading cache .././config.cache
> configure: error: `CFLAGS' has changed since the previous run:
> configure:   former value:  -O2 -g -O2
> configure:   current value: -O2 -g -O2
> configure: error: changes in the environment can compromise the build
> configure: error: run `make distclean' and/or `rm .././config.cache' and
> start over 
> configure: error: /bin/sh '../../../../src/newlib/libc/configure' failed
> for libc 
> 
> By piping the output to a file, I saw that the former value of CFLAGS is
> "-O2 -g -O2  " (two spaces), while the current value is "-O2 -g -O2 " (one
> space).  This causes the comparison in libc/configure to fail.  
> 
> The way I've resolved this is to replace the following line:
> 
>       if test "x$ac_old_val" != "x$ac_new_val"; then
> 
> with
> 
>       if test "`echo $ac_old_val`" != "`echo $ac_new_val`"; then
> 
> wherever it appears in any "configure" script (there are 75 configure
> scripts that contain this test, BTW).  There may be a more elegant way
> around this, but I haven't found it.

  It would be nice if it didn't involve running two extra subshell processes
for every single string comparison throughout the entire configure script.  I
could see that being a bit slow.

>  Running "make distclean" or removing config.cache doesn't resolve the
problem.   

  Ah.  So that's the *main* bug.  Solving and fixing /that/ one might indeed
be the 'more elegant' solution you're looking for; after all, although what
you've said is the case and what you've suggested does indeed fix it, there
are still situations that it can't handle, such as 

> configure:   former value:  -O2 -g -O2
> configure:   current value: -O2 -g  -O2

or

> configure:   former value:  -O2 -g -O2
> configure:   current value: -O2 -g

or

> configure:   former value:  -g -O2
> configure:   current value: -O2 -g


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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