GNU bug report logs - #18744
Problem with am__is_gnu_make: Arg list too long

Previous Next

Package: automake;

Reported by: "Daniel Richard G." <skunk <at> iSKUNK.ORG>

Date: Thu, 16 Oct 2014 02:58:02 UTC

Severity: normal

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 18744 in the body.
You can then email your comments to 18744 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 bug-automake <at> gnu.org:
bug#18744; Package automake. (Thu, 16 Oct 2014 02:58:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Daniel Richard G." <skunk <at> iSKUNK.ORG>:
New bug report received and forwarded. Copy sent to bug-automake <at> gnu.org. (Thu, 16 Oct 2014 02:58:02 GMT) Full text and rfc822 format available.

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

From: "Daniel Richard G." <skunk <at> iSKUNK.ORG>
To: bug-automake <at> gnu.org
Subject: Problem with am__is_gnu_make: Arg list too long
Date: Wed, 15 Oct 2014 22:57:29 -0400
Hello gnus,

I was hacking on libarchive for compatibility with an older Tru64
system, in conjuction with Automake 1.14.1, when I encountered a problem
during "gmake check":

[...]
gmake  check-TESTS
gmake[2]: Entering directory `/tmp/libarchive-3.1.2/_build'
gmake[3]: Entering directory `/tmp/libarchive-3.1.2/_build'
../build/autoconf/test-driver: line 107: 23320 Segmentation fault      "$@" >$log_file 2>&1
FAIL: libarchive_test
FAIL: bsdtar_test
FAIL: bsdcpio_test
FAIL: bsdcat_test
gmake[3]: execvp: bash: Arg list too long
gmake[3]: *** [test-suite.log] Error 127
gmake[3]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake[2]: *** [check-TESTS] Error 2
gmake[2]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake: *** [check] Error 2


Where was that "Arg list too long" error coming from? I removed some
leading "@" specifiers from some makefile recipe lines, and got this:

[...]
FAIL: libarchive_test
FAIL: bsdtar_test
FAIL: bsdcpio_test
FAIL: bsdcat_test
bases='libarchive_test.log bsdtar_test.log bsdcpio_test.log bsdcat_test.log'; bases=`for i in $bases; do echo $i; done | sed 's/\.log$//'`; bases=`echo $bases`; \
	am__f_ok () { test -f "$1" && test -r "$1"; }; \
	redo_bases=`for i in $bases; do \
	              am__f_ok $i.trs && am__f_ok $i.log || echo $i; \
	            done`; \
	if test -n "$redo_bases"; then \
	  redo_logs=`for i in $redo_bases; do echo $i.log; done`; \
	  redo_results=`for i in $redo_bases; do echo $i.trs; done`; \
	  if (target_option=n; case ${target_option-} in ?) ;; *) echo "am__make_running_with_option: internal error: invalid" "target option '${target_option-}' specified" >&2; exit 1;; esac; has_opt=no; sane_makeflags=$MAKEFLAGS; if test -n ' Makefile cat/.deps/bsdcat-bsdcat.Po cat/.deps/bsdcat-cmdline.Po cat/test/.deps/bsdcat_test-main.Po cat/test/.deps/bsdcat_test-test_0.Po cat/test/.deps/bsdcat_test-test_empty_gz.Po cat/test/.deps/bsdcat_test-test_empty_lz4.Po cat/test/.deps/bsdcat_test-test_empty_xz.Po cat/test/.deps/bsdcat_test-test_error.Po cat/test/.deps/bsdcat_test-test_error_mixed.Po cat/test/.deps/bsdcat_test-test_expand_Z.Po cat/test/.deps/bsdcat_test-test_expand_bz2.Po cat/test/.deps/bsdcat_test-test_expand_gz.Po cat/test/.deps/bsdcat_test-test_expand_lz4.Po cat/test/.deps/bsdcat_test-test_expand_mixed.Po cat/test/.deps/bsdcat_test-test_expand_plain.Po cat/test/.deps/bsdcat_test-test_expand_xz.Po cat/test/.deps/bsdcat_test-test_help.Po cat/test/.deps/bsdcat_test-test_version.Po cpio/.deps/bsdcpio-cmdline.Po cpio/.deps/bsdcpio-cpio.Po cpio/.deps/bsdcpio-cpio_windows.Po cpio/.deps/bsdcpio_test-cmdline.Po cpio/test/.deps/bsdcpio_test-main.Po cpio/test/.deps/bsdcpio_test-test_0.Po cpio/test/.deps/bsdcpio_test-test_basic.Po [...]


That last "if test -n" statement includes what appears to be every *.Po
and *.Plo file in the entire project---not helped, perhaps, by the fact
that this project has a bazillion source files and only a single top-
level makefile. Not only that, the output showed *two* full instances of
this list in the same recipe line, presumably resulting from two
expansions of the same problematic construct.

This appeared to be $(am__make_dryrun) at first, but nested within was
$(am__make_running_with_option), and in turn $(am__is_gnu_make):

    am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'

To confirm that this was the problem, I added the following rule to the
makefile...

    print-makefile-list:
            : $(MAKEFILE_LIST)

...and then tried

    $ gmake print-makefile-list
    :  Makefile cat/.deps/bsdcat-bsdcat.Po cat/.deps/bsdcat-cmdline.Po cat/test/.deps/bsdcat_test-main.Po cat/test/.deps/bsdcat_test-test_0.Po cat/test/.deps/bsdcat_test-test_empty_gz.Po [...]

Yep, those *.Po/*.Plo files are makefile fragments that get include'd,
so it makes sense that we end up with a huge MAKEFILE_LIST. If I change
am__is_gnu_make to...

    am__is_gnu_make = test -n '$(MAKE_VERSION)' && test -n '$(MAKELEVEL)'

...given that MAKE_VERSION appears to be a shorter example of a GNU-Make-
only variable, then things work as they should:

[...]
gmake[5]: Nothing to be done for `all-am'.
gmake[5]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake[4]: Leaving directory `/tmp/libarchive-3.1.2/_build'
============================================================================
Testsuite summary for libarchive 3.1.2
============================================================================
# TOTAL: 4
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to libarchive-discuss <at> googlegroups.com
============================================================================
gmake[3]: *** [test-suite.log] Error 1
gmake[3]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake[2]: *** [check-TESTS] Error 2
gmake[2]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake[1]: *** [check-am] Error 2
gmake[1]: Leaving directory `/tmp/libarchive-3.1.2/_build'
gmake: *** [check] Error 2


(At least as far as the test infrastructure is concerned!)


--Daniel


-- 
Daniel Richard G. || skunk <at> iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.




Information forwarded to bug-automake <at> gnu.org:
bug#18744; Package automake. (Fri, 19 Dec 2014 14:17:01 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: "Daniel Richard G." <skunk <at> iSKUNK.ORG>, 18744 <at> debbugs.gnu.org
Subject: Re: bug#18744: Problem with am__is_gnu_make: Arg list too long
Date: Fri, 19 Dec 2014 15:16:41 +0100
Reference: http://debbugs.gnu.org/18744

On 10/16/2014 04:57 AM, Daniel Richard G. wrote:
> Hello gnus,
>
> I was hacking on libarchive for compatibility with an older Tru64
> system, in conjuction with Automake 1.14.1, when I encountered a problem
> during "gmake check":
>
> [...]
> gmake  check-TESTS
> gmake[2]: Entering directory `/tmp/libarchive-3.1.2/_build'
> gmake[3]: Entering directory `/tmp/libarchive-3.1.2/_build'
> ../build/autoconf/test-driver: line 107: 23320 Segmentation fault      "$@" >$log_file 2>&1
> FAIL: libarchive_test
> FAIL: bsdtar_test
> FAIL: bsdcpio_test
> FAIL: bsdcat_test
> gmake[3]: execvp: bash: Arg list too long
> gmake[3]: *** [test-suite.log] Error 127
> gmake[3]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake[2]: *** [check-TESTS] Error 2
> gmake[2]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake[1]: *** [check-am] Error 2
> gmake[1]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake: *** [check] Error 2
>
>
> Where was that "Arg list too long" error coming from? I removed some
> leading "@" specifiers from some makefile recipe lines, and got this:
>
> [...]
> FAIL: libarchive_test
> FAIL: bsdtar_test
> FAIL: bsdcpio_test
> FAIL: bsdcat_test
> bases='libarchive_test.log bsdtar_test.log bsdcpio_test.log bsdcat_test.log'; bases=`for i in $bases; do echo $i; done | sed 's/\.log$//'`; bases=`echo $bases`; \
> 	am__f_ok () { test -f "$1" && test -r "$1"; }; \
> 	redo_bases=`for i in $bases; do \
> 	              am__f_ok $i.trs && am__f_ok $i.log || echo $i; \
> 	            done`; \
> 	if test -n "$redo_bases"; then \
> 	  redo_logs=`for i in $redo_bases; do echo $i.log; done`; \
> 	  redo_results=`for i in $redo_bases; do echo $i.trs; done`; \
> 	  if (target_option=n; case ${target_option-} in ?) ;; *) echo "am__make_running_with_option: internal error: invalid" "target option '${target_option-}' specified" >&2; exit 1;; esac; has_opt=no; sane_makeflags=$MAKEFLAGS; if test -n ' Makefile cat/.deps/bsdcat-bsdcat.Po cat/.deps/bsdcat-cmdline.Po cat/test/.deps/bsdcat_test-main.Po cat/test/.deps/bsdcat_test-test_0.Po cat/test/.deps/bsdcat_test-test_empty_gz.Po cat/test/.deps/bsdcat_test-test_empty_lz4.Po cat/test/.deps/bsdcat_test-test_empty_xz.Po cat/test/.deps/bsdcat_test-test_error.Po cat/test/.deps/bsdcat_test-test_error_mixed.Po cat/test/.deps/bsdcat_test-test_expand_Z.Po cat/test/.deps/bsdcat_test-test_expand_bz2.Po cat/test/.deps/bsdcat_test-test_expand_gz.Po cat/test/.deps/bsdcat_test-test_expand_lz4.Po cat/test/.deps/bsdcat_test-test_expand_mixed.Po cat/test/.deps/bsdcat_test-test_expand_plain.Po cat/test/.deps/bsdcat_test-test_expand_xz.Po cat/test/.deps/bsdcat_test-test_help.Po cat/test/.deps/bsdcat_test-test_version.
Po cpio/.deps/bsdcpio-cmdline.Po cpio/.deps/bsdcpio-cpio.Po cpio/.deps/bsdcpio-cpio_windows.Po cpio/.deps/bsdcpio_test-cmdline.Po cpio/test/.deps/bsdcpio_test-main.Po cpio/test/.deps/bsdcpio_test-test_0.Po cpio/test/.deps/bsdcpio_test-test_basic.Po [...]
>
>
> That last "if test -n" statement includes what appears to be every *.Po
> and *.Plo file in the entire project---not helped, perhaps, by the fact
> that this project has a bazillion source files and only a single top-
> level makefile. Not only that, the output showed *two* full instances of
> this list in the same recipe line, presumably resulting from two
> expansions of the same problematic construct.
>
> This appeared to be $(am__make_dryrun) at first, but nested within was
> $(am__make_running_with_option), and in turn $(am__is_gnu_make):
>
>      am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
>
> To confirm that this was the problem, I added the following rule to the
> makefile...
>
>      print-makefile-list:
>              : $(MAKEFILE_LIST)
>
> ...and then tried
>
>      $ gmake print-makefile-list
>      :  Makefile cat/.deps/bsdcat-bsdcat.Po cat/.deps/bsdcat-cmdline.Po cat/test/.deps/bsdcat_test-main.Po cat/test/.deps/bsdcat_test-test_0.Po cat/test/.deps/bsdcat_test-test_empty_gz.Po [...]
>
> Yep, those *.Po/*.Plo files are makefile fragments that get include'd,
> so it makes sense that we end up with a huge MAKEFILE_LIST. If I change
> am__is_gnu_make to...
>
>      am__is_gnu_make = test -n '$(MAKE_VERSION)' && test -n '$(MAKELEVEL)'
>
> ...given that MAKE_VERSION appears to be a shorter example of a GNU-Make-
> only variable, then things work as they should:
>
> [...]
> gmake[5]: Nothing to be done for `all-am'.
> gmake[5]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake[4]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> ============================================================================
> Testsuite summary for libarchive 3.1.2
> ============================================================================
> # TOTAL: 4
> # PASS:  0
> # SKIP:  0
> # XFAIL: 0
> # FAIL:  4
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See ./test-suite.log
> Please report to libarchive-discuss <at> googlegroups.com
> ============================================================================
> gmake[3]: *** [test-suite.log] Error 1
> gmake[3]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake[2]: *** [check-TESTS] Error 2
> gmake[2]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake[1]: *** [check-am] Error 2
> gmake[1]: Leaving directory `/tmp/libarchive-3.1.2/_build'
> gmake: *** [check] Error 2
>
>
> (At least as far as the test infrastructure is concerned!)
>
>
> --Daniel
>
>
Thanks for the report.  I agree with the spirit of your fix, but
unfortunately the $(MAKE_VERSION) macro seem present also in non-GNU
implementations of make (e.g., FreeBSD's).  Let me look for a better
variable...




Information forwarded to bug-automake <at> gnu.org:
bug#18744; Package automake. (Fri, 19 Dec 2014 17:13:02 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: "Daniel Richard G." <skunk <at> iSKUNK.ORG>, 18744 <at> debbugs.gnu.org
Cc: "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#18744: Problem with am__is_gnu_make: Arg list too long
Date: Fri, 19 Dec 2014 18:12:14 +0100
[Message part 1 (text/plain, inline)]
tags 18744 + patch
close 18744
stop

Reference: http://debbugs.gnu.org/18744

Should be fixed by the attached patch.

Thanks,
  Stefano
[0001-Improve-detection-of-GNU-make-avoiding-Arg-list-too-.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 17:13:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 18744 <at> debbugs.gnu.org and "Daniel Richard G." <skunk <at> iSKUNK.ORG> Request was from Stefano Lattarini <stefano.lattarini <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 19 Dec 2014 17:13:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-automake <at> gnu.org:
bug#18744; Package automake. (Fri, 19 Dec 2014 19:14:02 GMT) Full text and rfc822 format available.

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

From: "Daniel Richard G." <skunk <at> iSKUNK.ORG>
To: Stefano Lattarini <stefano.lattarini <at> gmail.com>, 18744 <at> debbugs.gnu.org
Cc: "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#18744: Problem with am__is_gnu_make: Arg list too long
Date: Fri, 19 Dec 2014 14:13:29 -0500
On Fri, 2014 Dec 19 18:12+0100, Stefano Lattarini wrote:
> tags 18744 + patch
> close 18744
> stop
>
> Reference: http://debbugs.gnu.org/18744
>
> Should be fixed by the attached patch.

Thank you Stefano, just a few comment typos I noticed:

* "The code used to detect whether the currently used make is GNU make
  or not not"

* Probably should read "no longer risks causing" rather than "risk"

* "as those cause non-GNU implementations" rather than "that cause ...
  implmentations"

* "We can't use $(MAKE_VERSION) here, as it is also defined" rather than
  "as it also"

* "might cause the shell to die" rather than "might cause to die"?


--Daniel


-- 
Daniel Richard G. || skunk <at> iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.




Information forwarded to bug-automake <at> gnu.org:
bug#18744; Package automake. (Fri, 19 Dec 2014 20:01:01 GMT) Full text and rfc822 format available.

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

From: Stefano Lattarini <stefano.lattarini <at> gmail.com>
To: "Daniel Richard G." <skunk <at> iSKUNK.ORG>, 18744 <at> debbugs.gnu.org
Cc: "automake-patches <at> gnu.org" <automake-patches <at> gnu.org>
Subject: Re: bug#18744: Problem with am__is_gnu_make: Arg list too long
Date: Fri, 19 Dec 2014 21:00:35 +0100
On 12/19/2014 08:13 PM, Daniel Richard G. wrote:
> On Fri, 2014 Dec 19 18:12+0100, Stefano Lattarini wrote:
>> tags 18744 + patch
>> close 18744
>> stop
>>
>> Reference: http://debbugs.gnu.org/18744
>>
>> Should be fixed by the attached patch.
>
> Thank you Stefano, just a few comment typos I noticed:
>
> * "The code used to detect whether the currently used make is GNU make
>    or not not"
>
> * Probably should read "no longer risks causing" rather than "risk"
>
> * "as those cause non-GNU implementations" rather than "that cause ...
>    implmentations"
>
> * "We can't use $(MAKE_VERSION) here, as it is also defined" rather than
>    "as it also"
>
> * "might cause the shell to die" rather than "might cause to die"?
>
>
> --Daniel
>
>
Thanks Daniel, I've applied all your suggested fixes before pushing.




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

This bug report was last modified 9 years and 94 days ago.

Previous Next


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