Bug 40800 - libcpp breaks bootstrap
Summary: libcpp breaks bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: regression (show other bugs)
Version: 4.5.0
: P1 blocker
Target Milestone: ---
Assignee: Jerry Quinn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-18 17:53 UTC by kargls
Modified: 2009-07-20 19:00 UTC (History)
3 users (show)

See Also:
Host:
Target: i386-unknown-freebsd8.0
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-07-19 21:16:26


Attachments
libcpp/Makefile (3.43 KB, text/plain)
2009-07-18 19:31 UTC, kargls
Details
libcpp/config.cache (1.64 KB, text/plain)
2009-07-18 19:31 UTC, kargls
Details
libcpp/config.log (9.64 KB, text/plain)
2009-07-18 19:32 UTC, kargls
Details
Tail end of build log (1.53 KB, text/plain)
2009-07-18 20:11 UTC, kargls
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kargls 2009-07-18 17:53:09 UTC
gmake[3]: Entering directory `/usr/home/kargl/gcc/obj4x/libcpp'
source='../../gcc4x/libcpp/charset.c' object='charset.o' libtool=no DEPDIR=.deps  /bin/sh ../../gcc4x/libcpp/../depcomp gcc  -I../../gcc4x/libcpp -I. -I../../gcc4x/libcpp/../include -I./../intl -I../../gcc4x/libcpp/include  -g -fkeep-inline-functions -W -Wall -Wwrite-strings -Wmissing-format-attribute -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat -pedantic -Wno-long-long  -I../../gcc4x/libcpp -I. -I../../gcc4x/libcpp/../include -I./../intl -I../../gcc4x/libcpp/include  -c ../../gcc4x/libcpp/charset.c
depcomp: Variables source, object and depmode must be set
gmake[3]: *** [charset.o] Error 1
gmake[3]: Leaving directory `/usr/home/kargl/gcc/obj4x/libcpp'
gmake[2]: *** [all-stage1-libcpp] Error 2
gmake[2]: Leaving directory `/usr/home/kargl/gcc/obj4x'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/usr/home/kargl/gcc/obj4x'
gmake: *** [bootstrap] Error 2
Comment 1 kargls 2009-07-18 18:00:39 UTC
This is caused by revision 149763

REMOVE:kargl[252] svn merge -r149763:149762 .

allows bootstrap to proceed.
Comment 2 kargls 2009-07-18 18:09:36 UTC
Note, I configure my build with

../gcc4x/configure --prefix=$HOME/work --enable-languages=c,fortran
Comment 3 Jerry Quinn 2009-07-18 18:52:49 UTC
(In reply to comment #2)
> Note, I configure my build with
> 
> ../gcc4x/configure --prefix=$HOME/work --enable-languages=c,fortran

I can't reproduce the problem on my system.  Can you recreate the bug?  Then attach libcpp/Makefile, libcpp/config.log, and libcpp/config.cache?

Thanks
Comment 4 kargls 2009-07-18 19:30:07 UTC
Build fails also on x86_64-unknown-freebsd8.0
Comment 5 kargls 2009-07-18 19:31:21 UTC
Created attachment 18221 [details]
libcpp/Makefile
Comment 6 kargls 2009-07-18 19:31:51 UTC
Created attachment 18222 [details]
libcpp/config.cache
Comment 7 kargls 2009-07-18 19:32:17 UTC
Created attachment 18223 [details]
libcpp/config.log
Comment 8 John David Anglin 2009-07-18 20:09:33 UTC
Also seen on hppa64-hp-hpux11.11.
Comment 9 kargls 2009-07-18 20:11:10 UTC
Created attachment 18224 [details]
Tail end of build log

Note the portion of the log that read

checking whether gcc supports -pedantic -Wno-long-long... yes
test: no: unexpected operator
checking dependency style of g++... gcc3
checking whether time.h and sys/time.h may both be included... yes
checking whether string.h and strings.h may both be included... yes
test: no: unexpected operator
checking how to run the C++ preprocessor... g++ -E

Looks like the configure is broken.
Comment 10 Jerry Quinn 2009-07-19 05:09:29 UTC
(In reply to comment #9)
> Looks like the configure is broken.

One thing I can see from the log is that configure is acting as if ENABLE_BUILD_WITH_CXX is enabled.  Can you try the following patch on libcpp/configure, and see if that fixes the problem?


Index: configure
===================================================================
--- configure	(revision 149777)
+++ configure	(working copy)
@@ -3342,7 +3342,7 @@
           ac_config_commands="$ac_config_commands depdir"
 
 
-if test "$ENABLE_BUILD_WITH_CXX" == "no"; then
+if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
 depcc="$CC"   am_compiler_list=
 
 am_depcomp=$ac_aux_dir/depcomp
@@ -3674,7 +3674,7 @@
 # AC_CHECK_HEADERS is repeated to work around apparent autoconf 2.59 bug.  If
 # AC_CHECK_HEADERS comes after the if clause, the last AC_LANG call gets used,
 # no matter which branch is taken.
-if test "$ENABLE_BUILD_WITH_CXX" == "no"; then
+if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
    ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

Comment 11 Steve Kargl 2009-07-19 05:30:16 UTC
Subject: Re:  libcpp breaks bootstrap

On Sun, Jul 19, 2009 at 05:09:31AM -0000, jlquinn at optonline dot net wrote:
> 
> 
> ------- Comment #10 from jlquinn at optonline dot net  2009-07-19 05:09 -------
> (In reply to comment #9)
> > Looks like the configure is broken.
> 
> One thing I can see from the log is that configure is acting as if
> ENABLE_BUILD_WITH_CXX is enabled.  Can you try the following patch on
> libcpp/configure, and see if that fixes the problem?
> 
> 
> Index: configure
> ===================================================================
> --- configure   (revision 149777)
> +++ configure   (working copy)
> @@ -3342,7 +3342,7 @@
>            ac_config_commands="$ac_config_commands depdir"
> 
> 
> -if test "$ENABLE_BUILD_WITH_CXX" == "no"; then
> +if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
>  depcc="$CC"   am_compiler_list=
> 
>  am_depcomp=$ac_aux_dir/depcomp
> @@ -3674,7 +3674,7 @@
>  # AC_CHECK_HEADERS is repeated to work around apparent autoconf 2.59 bug.  If
>  # AC_CHECK_HEADERS comes after the if clause, the last AC_LANG call gets used,
>  # no matter which branch is taken.
> -if test "$ENABLE_BUILD_WITH_CXX" == "no"; then
> +if test "$ENABLE_BUILD_WITH_CXX" = "no"; then
>     ac_ext=c
>  ac_cpp='$CPP $CPPFLAGS'
>  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
> 

This patch appears to fix the problem.  At least, bootstrap has made it
past the initial build of libcpp.  I don't know if this is the correct
fix in that I know very little about autoconf.

Comment 12 Jerry Quinn 2009-07-19 15:56:39 UTC
(In reply to comment #8)
> Also seen on hppa64-hp-hpux11.11.
> 

Does the patch also fix the hpux failure?
Comment 13 dave 2009-07-19 17:24:34 UTC
Subject: Re:  libcpp breaks bootstrap

> (In reply to comment #8)
> > Also seen on hppa64-hp-hpux11.11.
> > 
> 
> Does the patch also fix the hpux failure?

Yes.

Dave
Comment 14 kargls 2009-07-20 16:51:19 UTC
Can you commit your fix 

http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01109.html

or revert your change that is causing the problem?
Comment 15 dave 2009-07-20 17:17:57 UTC
Subject: Re:  libcpp breaks bootstrap

> Can you commit your fix 
> 
> http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01109.html
> 
> or revert your change that is causing the problem?

configure.ac needs to be changed and configure rebuilt.

Dave
Comment 16 Jerry Quinn 2009-07-20 17:42:49 UTC
(In reply to comment #14)
> Can you commit your fix 
> 
> http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01109.html
> 
> or revert your change that is causing the problem?

I posted the fix yesterday.  I'm write-after-approval, and I thought I needed to wait for someone to OK the patch.

The actual patch makes the change to configure.ac and regenerates configure from there.

Comment 17 dave 2009-07-20 17:51:40 UTC
Subject: Re:  libcpp breaks bootstrap

> I posted the fix yesterday.  I'm write-after-approval, and I thought I needed
> to wait for someone to OK the patch.

Probably could have been applied as obvious.

Dave
Comment 18 Steve Kargl 2009-07-20 17:56:57 UTC
Subject: Re:  libcpp breaks bootstrap

On Mon, Jul 20, 2009 at 05:42:50PM -0000, jlquinn at optonline dot net wrote:
> 
> 
> ------- Comment #16 from jlquinn at optonline dot net  2009-07-20 17:42 -------
> (In reply to comment #14)
> > Can you commit your fix 
> > 
> > http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01109.html
> > 
> > or revert your change that is causing the problem?
> 
> I posted the fix yesterday.  I'm write-after-approval, and I thought I needed
> to wait for someone to OK the patch.
> 
> The actual patch makes the change to configure.ac and regenerates configure
> from there.
> 

Given that your subject line includes freebsd8.0.  I doubt anyone
will jump up and review your patch unless you specifically ping the
person who approved your original patch.

I also doubt write-after-approval applies in a situation where
your previous commit has completely broken the ability for
more than one OS to bootstrap.

Comment 19 Jerry Quinn 2009-07-20 18:09:46 UTC
Subject: Bug 40800

Author: jlquinn
Date: Mon Jul 20 18:09:33 2009
New Revision: 149826

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149826
Log:
2009-07-20  Jerry Quinn  <jlquinn@optonline.net>

	    PR regression/40800
	    * configure.ac: Use = instead of == for testing
	    ENABLE_BUILD_WITH_CXX.
	    * configure: Rebuild.


Modified:
    trunk/libcpp/ChangeLog
    trunk/libcpp/configure
    trunk/libcpp/configure.ac

Comment 20 Steve Kargl 2009-07-20 18:28:45 UTC
Subject: Re:  libcpp breaks bootstrap

On Mon, Jul 20, 2009 at 06:09:46PM -0000, jlquinn at gcc dot gnu dot org wrote:
> 
> Author: jlquinn
> Date: Mon Jul 20 18:09:33 2009
> New Revision: 149826
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149826
> Log:
> 2009-07-20  Jerry Quinn  <jlquinn@optonline.net>
> 
>             PR regression/40800
>             * configure.ac: Use = instead of == for testing
>             ENABLE_BUILD_WITH_CXX.
>             * configure: Rebuild.
> 

Thanks!

Comment 21 Jerry Quinn 2009-07-20 19:00:22 UTC
http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01109.html

Committed as patch is simple and fixes multiple platforms.