Bug 960 - recent change makes bootstrap / 'make install' fail
Summary: recent change makes bootstrap / 'make install' fail
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: admin (show other bugs)
Version: 2.16
: P2 normal
Target Milestone: ---
Assignee: Daniel Jacobowitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-21 15:44 UTC by Thomas Schwinge
Modified: 2006-03-28 09:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schwinge 2005-05-21 15:44:55 UTC
The following recent change
#v+
2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>

	* Makefile.am: Use a temporary file to build chew.
	* Makefile.in: Regenerated.
#v-

#v+
--- src/bfd/doc/Makefile.am	2005/04/29 14:02:15	1.14.2.1
+++ src/bfd/doc/Makefile.am	2005/05/09 21:14:24	1.14.2.2
@@ -54,8 +54,11 @@
 
 MKDOC = chew$(EXEEXT_FOR_BUILD)
 
-$(MKDOC): chew.o
-	$(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
+$(MKDOC): $(srcdir)/chew.c
+	$(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+	  $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+	  $(INCLUDES); \
+	$(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 chew.o: chew.c
 	$(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include
-I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
#v-

... made the bootstrap of a GNU/Hurd system fail:

#v+
$ make
[...]
$ make install
[...]
make chew
make[1]: Entering directory `/fs/data/mount/tmp/gnu/src/binutils.obj/bfd/doc'
gcc -o chew.$$ /var/tmp/gnu/src/binutils/bfd/doc/chew.c \
     \
  ; \
/bin/sh /var/tmp/gnu/src/binutils/bfd/doc/../../move-if-change chew.$$ chew
/var/tmp/gnu/src/binutils/bfd/doc/chew.c:85:22: ansidecl.h: No such file or
directory
/var/tmp/gnu/src/binutils/bfd/doc/chew.c:86:20: sysdep.h: No such file or directory
/var/tmp/gnu/src/binutils/bfd/doc/chew.c: In function `catchar':
/var/tmp/gnu/src/binutils/bfd/doc/chew.c:199: warning: assignment makes pointer
from integer without a cast
/var/tmp/gnu/src/binutils/bfd/doc/chew.c: In function `catbuf':
/var/tmp/gnu/src/binutils/bfd/doc/chew.c:226: warning: assignment makes pointer
from integer without a cast
mv: cannot stat `chew.3254': No such file or directory
make[1]: *** [chew] Error 1
make[1]: Leaving directory `/fs/data/mount/tmp/gnu/src/binutils.obj/bfd/doc'
make: *** [aoutx.texi] Error 2
#v-

Reverting the above change, 'make install' completed successfully.

This needs to be fixed on both 2.16-branch and HEAD AFAICS.
Comment 1 Daniel Jacobowitz 2005-05-21 23:25:44 UTC
Subject: Re:  New: recent change makes bootstrap / 'make install' fail

On Sat, May 21, 2005 at 03:44:57PM -0000, schwinge-bugzilla-sources dot redhat dot com at nic-nac-project dot de wrote:
> The following recent change
> #v+
> 2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>
> 
> 	* Makefile.am: Use a temporary file to build chew.
> 	* Makefile.in: Regenerated.
> #v-

Was this on a 2.16 or HEAD tree?  It looks like I broke the patch when
I moved it to 2.16, so only the branch is affected.


Comment 2 Thomas Schwinge 2005-05-22 14:10:47 UTC
Subject: Re:  recent change makes bootstrap / 'make install' fail

On Sat, May 21, 2005 at 11:25:23PM -0000, drow at sources dot redhat dot com wrote:
> 
> ------- Additional Comments From drow at sources dot redhat dot com  2005-05-21 23:25 -------
> Subject: Re:  New: recent change makes bootstrap / 'make install' fail
> 
> On Sat, May 21, 2005 at 03:44:57PM -0000, schwinge-bugzilla-sources dot redhat dot com at nic-nac-project dot de wrote:
> > The following recent change
> > #v+
> > 2005-05-09  Daniel Jacobowitz  <dan@codesourcery.com>
> > 
> > 	* Makefile.am: Use a temporary file to build chew.
> > 	* Makefile.in: Regenerated.
> > #v-
> 
> Was this on a 2.16 or HEAD tree?

binutils-2_16-branch.

> It looks like I broke the patch when
> I moved it to 2.16, so only the branch is affected.

I don't think so:

#v+
--- Tbinutils-2_16-branch/src/bfd/doc/Makefile.am       2005-05-21 10:57:33.000000000 +0200
+++ THEAD/src/bfd/doc/Makefile.am       2005-05-21 16:47:09.000000000 +0200
@@ -54,6 +54,9 @@
 
 MKDOC = chew$(EXEEXT_FOR_BUILD)
 
+INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
+       -I$(srcdir)/../../intl -I../../intl
+
 $(MKDOC): $(srcdir)/chew.c
        $(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
          $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
@@ -61,7 +64,7 @@
        $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 chew.o: chew.c
-       $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.
c
+       $(CC_FOR_BUILD) -c $(INCLUDES) $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
 
 protos: libbfd.h libcoff.h bfd.h
 
#v-


Why did you make $(MKDOC) depend on chew.c and not chew.o, like it was
before?

#v+
--- Nbinutils-2_16/src/bfd/doc/Makefile.am      2005-05-21 17:38:51.000000000 +0200
+++ Tbinutils-2_16-branch/src/bfd/doc/Makefile.am       2005-05-21 10:57:33.000000000 +0200
@@ -54,8 +54,11 @@
 
 MKDOC = chew$(EXEEXT_FOR_BUILD)
 
-$(MKDOC): chew.o
-       $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD)
+$(MKDOC): $(srcdir)/chew.c
+       $(CC_FOR_BUILD) -o chew.$$$$ $(srcdir)/chew.c \
+         $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $(H_CFLAGS) \
+         $(INCLUDES); \
+       $(SHELL) $(srcdir)/../../move-if-change chew.$$$$ $(MKDOC)
 
 chew.o: chew.c
        $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c
#v-


Regards,
 Thomas
Comment 3 Daniel Jacobowitz 2005-05-22 14:13:11 UTC
Subject: Re:  recent change makes bootstrap / 'make install' fail

On Sun, May 22, 2005 at 02:10:48PM -0000, schwinge at nic-nac-project dot de wrote:
> I don't think so:
> 
> #v+
> --- Tbinutils-2_16-branch/src/bfd/doc/Makefile.am       2005-05-21 10:57:33.000000000 +0200
> +++ THEAD/src/bfd/doc/Makefile.am       2005-05-21 16:47:09.000000000 +0200
> @@ -54,6 +54,9 @@
>  
>  MKDOC = chew$(EXEEXT_FOR_BUILD)
>  
> +INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../../include \
> +       -I$(srcdir)/../../intl -I../../intl
> +

Note that $(INCLUDES) is missing from the 2.16 branch and present on
HEAD.  I didn't notice this until I saw your report.

> Why did you make $(MKDOC) depend on chew.c and not chew.o, like it was
> before?

That was the whole point of the patch.  This way there are no common
temporary files between possible parallel builds of chew.


Comment 4 Ben Elliston 2006-03-28 03:05:20 UTC
This PR looks like it can be closed now.  Correct?
Comment 5 Thomas Schwinge 2006-03-28 09:03:07 UTC
> This PR looks like it can be closed now.  Correct?

It's been a long time, but as I didn't see this breakage anymore: yes.