GNU bug report logs - #8485
Regression in maint: "make distcheck" fails when yacc is used with subdir-objects option

Previous Next

Package: automake;

Reported by: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Date: Tue, 12 Apr 2011 12:38:01 UTC

Severity: serious

Tags: patch

Done: Stefano Lattarini <stefano.lattarini <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8485 in the body.
You can then email your comments to 8485 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-automake <at> gnu.org:
bug#8485; Package automake. (Tue, 12 Apr 2011 12:38:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefano Lattarini <stefano.lattarini <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Tue, 12 Apr 2011 12:38:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Subject: Regression in maint: "make distcheck" fails when yacc is used with
	subdir-objects option
Date: Tue, 12 Apr 2011 14:36:56 +0200
[Message part 1 (text/plain, inline)]
Apparently, in projects using Automake yacc support with the 'subdir-objects'
option enabled, "make distcheck" fails, because in a VPATH build make (even
GNU make) seems unable to find the distributed yacc-generated C files.  This
failure happens only with the developement version of automake, while 1.11
behaves fine.

Here is an incomplete stripped-down example:

  $ cat > configure.in <<'END'
  AC_INIT(x, 0)
  AM_INIT_AUTOMAKE(foreign)
  AC_CONFIG_FILES(Makefile)
  AC_PROG_CC
  AM_PROG_CC_C_O
  AC_PROG_YACC
  AC_OUTPUT
  $ cat > Makefile.am <<'END'
  AUTOMAKE_OPTIONS = subdir-objects
  noinst_PROGRAMS = foo
  foo_SOURCES = sub/parse.y
  END
  $ ... # create sub/parse.y here
  $ AUTOMAKE=/path/to/devel/automake ACLOCAL=/path/to/devel/aclocal autoreconf -vi
  autoreconf: Entering directory `.'
  autoreconf: configure.in: not using Gettext
  autoreconf: running: aclocal 
  autoreconf: configure.in: tracing
  autoreconf: configure.in: not using Libtool
  autoreconf: running: /usr/bin/autoconf
  autoreconf: configure.in: not using Autoheader
  autoreconf: running: automake --add-missing --copy --no-force
  configure.in:5: installing `./compile'
  configure.in:2: installing `./install-sh'
  configure.in:2: installing `./missing'
  Makefile.am: installing `./depcomp'
  configure.in: installing `./ylwrap'
  autoreconf: Leaving directory `.'
  $ ./configure
  ...
  $ make
  ...
  $ ls sub
  parse.c  parse.y
  $ make distcheck
  ...
  rm -rf sub/.deps
  rm -f Makefile
  ERROR: files left in build directory after distclean:
  ./sub/parse.c
  make[1]: *** [distcleancheck] Error 1
  make[1]: Leaving directory `/tmp/yyy/x-0/_build'
  $ make distclean
  ...
  $ mkdir build && cd build
  $ ../configure YACC=false
  ...
  $ make
  /bin/sh ../ylwrap ../sub/parse.y y.tab.c sub/parse.c ... -- false  
  make: *** [sub/parse.c] Error 1
  $ make YACC=yacc
  ...
  gcc  -g -O2   -o foo sub/parse.o 
  $ ls sub
  parse.c  parse.o

The attached testcase expeses the bug.

Looking at the diffs of the Makefile.in generated by automake-1.11
and automake-maint, I've found only this suspicious difference:

  @@ -544,6 +551,8 @@
 
   ps-am:
 
  +sub/parse.c: sub/$(am__dirstamp)
  +
   uninstall-am:
 
   .MAKE: install-am install-strip

which makes me suspect that the regression has been introduced
by commit v1.11-328-ge87c030 "Create subdirs for generated
sources even when not dep tracking."

Regards,
  Stefano
[yacc-distcheck-subdir.test (application/x-shellscript, inline)]

Severity set to 'serious' from 'normal' Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 18 Sep 2011 19:11:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#8485; Package automake. (Thu, 20 Oct 2011 20:36:02 GMT) Full text and rfc822 format available.

Message #10 received at 8485 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: automake-patches <at> gnu.org
Cc: 8526 <at> debbugs.gnu.org, 8485 <at> debbugs.gnu.org
Subject: [PATCH] {maint} deps: partially revert commit `v1.11-512-geeee551'
Date: Thu, 20 Oct 2011 22:33:59 +0200
This change partly reverts commit "Create subdirs for generated
sources even when not dep tracking", of 2011-04-02.

That commit had caused the bugs #8485 and #8526.  Since we are
nearing the bug-fixing automake release 1.11.2, the safest policy
at the moment is to just revert the problematic hunks: an older,
known bug is better than a regression.

I will wait until Sunday before pushing, to allow for reviews
and objections.

Regards,
  Stefano

---
 ChangeLog         |   14 ++++++++++++++
 automake.in       |    9 ---------
 tests/Makefile.am |    2 +-
 tests/Makefile.in |    2 +-
 4 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a022b09..64284f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2011-10-20  Stefano Lattarini  <stefano.lattarini <at> gmail.com>
+
+	deps: partially revert commit `v1.11-512-geeee551'
+	This change partly reverts commit "Create subdirs for generated
+	sources even when not dep tracking", of 2011-04-02.
+	That commit had caused the bugs #8485 and #8526.  Since we are
+	nearing the bug-fixing automake release 1.11.2, the safest policy
+	at the moment is to just revert the problematic hunks: an older,
+	known bug is better than a regression.
+	* automake.in (handle_single_transform): Don't add a dirstamp
+	dependency, even when $object is derived and lands in a subdir.
+	* tests/Makefile.am (XFAIL_TESTS): Add lex-subobj-nodep.test,
+	remove yacc-dist-nobuild-subdir.test.
+
 2011-10-18  Stefano Lattarini  <stefano.lattarini <at> gmail.com>
 
 	tests: fix spurious failure with FreeBSD make and Yacc in VPATH
diff --git a/automake.in b/automake.in
index 516e594..db7f3c6 100755
--- a/automake.in
+++ b/automake.in
@@ -2053,15 +2053,6 @@ sub handle_single_transform ($$$$$%)
 	    # derived from is not.
 	    &push_dist_common ($object)
 	      unless ($topparent =~ /^(?:nobase_)?nodist_/);
-
-	    # If resulting derived source is in a subdir, we need to make
-	    # sure the subdir exists at build time.
-	    if ($object =~ /\//)
-	      {
-		my $dirstamp = require_build_directory_maybe ($object);
-		depend ($object, $dirstamp)
-		  if ($dirstamp);
-	      }
 	    next;
 	  }
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 36ac88e..45e50f8 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -25,7 +25,7 @@ dist-auxfile-2.test \
 gcj6.test \
 java-nobase.test \
 pr8365-remake-timing.test \
-yacc-dist-nobuild-subdir.test \
+lex-subobj-nodep.test \
 vala-vpath.test \
 txinfo5.test
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 8bdd107..be98a4e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -296,7 +296,7 @@ dist-auxfile-2.test \
 gcj6.test \
 java-nobase.test \
 pr8365-remake-timing.test \
-yacc-dist-nobuild-subdir.test \
+lex-subobj-nodep.test \
 vala-vpath.test \
 txinfo5.test
 
-- 
1.7.2.3





Information forwarded to bug-automake <at> gnu.org:
bug#8485; Package automake. (Mon, 24 Oct 2011 17:54:02 GMT) Full text and rfc822 format available.

Message #13 received at 8485 <at> debbugs.gnu.org (full text, mbox):

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: bug-automake <at> gnu.org
Cc: 8526 <at> debbugs.gnu.org, automake-patches <at> gnu.org, 8485 <at> debbugs.gnu.org
Subject: Re: bug#8526: [PATCH] {maint} deps: partially revert commit
	`v1.11-512-geeee551'
Date: Mon, 24 Oct 2011 19:51:23 +0200
[Message part 1 (text/plain, inline)]
tags 8485 patch
tags 8526 patch
close 8485
close 8526
thanks

On Thursday 20 October 2011, Stefano Lattarini wrote:
> This change partly reverts commit "Create subdirs for generated
> sources even when not dep tracking", of 2011-04-02.
> 
> That commit had caused the bugs #8485 and #8526.  Since we are
> nearing the bug-fixing automake release 1.11.2, the safest policy
> at the moment is to just revert the problematic hunks: an older,
> known bug is better than a regression.
> 
> I will wait until Sunday before pushing, to allow for reviews
> and objections.
> 
Pushed now.  I'm thus closing the relevant bug reports.

OTOH, I've opened a new bug report, to keep track of the old
bug my patch has re-introduced.  See automake bug#9859.

Regards,
  Stefano
[Message part 2 (text/html, inline)]

Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 24 Oct 2011 17:54:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 8485 <at> debbugs.gnu.org and Stefano Lattarini <stefano.lattarini <at> gmail.com> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Mon, 24 Oct 2011 17:54:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 22 Nov 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 210 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.