[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too l
From: |
Carnë Draug |
Subject: |
[Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message |
Date: |
Sun, 13 Jan 2013 20:32:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20100101 Firefox/10.0.11 Iceweasel/10.0.11 |
URL:
<http://savannah.gnu.org/bugs/?38075>
Summary: 'make' fails with "Argument list too long" message
Project: GNU Octave
Submitted by: carandraug
Submitted on: Sun 13 Jan 2013 20:32:06 GMT
Category: Configuration and Build System
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Build Failure
Status: None
Assigned to: None
Originator Name: Sergei Steshenko
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.6.2
Operating System: GNU/Linux
_______________________________________________________
Details:
Hi
this bug was reported on the mailing list last November and I've kept it
marked since. I'm putting it here so it's not forgotten as I'm unlikely to fix
it myself.
Building octave-3.6.2 with somewhat longer list of dependencies, 'make'
fails:
/mnt/sdb8/sergei/AFSWD_debug/build/octave-3.6.2/src/Makefile:9063 File
`oct-conf.h' does not exist.
/mnt/sdb8/sergei/AFSWD_debug/build/octave-3.6.2/src/Makefile:9063 Must
remake target `oct-conf.h'.
making oct-conf.h from oct-conf.h.in
make[2]: execvp: /mnt/sdb8/sergei/AFSWD_debug/20121021/bash-4.2/bin/bash:
Argument list too long
Makefile:9063: *** [oct-conf.h] Error 127
The failing part in context:
9063 oct-conf.h: oct-conf.h.in Makefile
9064 @$(do_subst_config_vals)
9065
And, in particular, the offending part is 'do_subst_config_vals' which I have
attached. As one can see, the macro itself is quite long, and contents of the
variables it exapnds (e.g. CPPFLAGS) are also quite long, so it's surprising
it hasn't failed earlier.
I performed quick web search regarding "Argument list too long" and came
across http://www.in-ulm.de/~mascheck/various/argmax/ . The page has contains
a number of useful advices (though it deal with a different situation: command
* ) :
How to avoid the limit in a shell:
If command * fails, then you can
* iterate with the shell:
** for i in *; do command "$i"; done (simple, completely robust and
portable, may be very slow)
* iterate with find
** find . -exec command {} \; (simple, completely robust and portable, may
be very slow)
** find . -exec command {} + (optimizes speed)
** find . -print0|xargs -0 command (optimizes speed, if find doesn't
implement "-exec +" but knows "-print0")
** find . -print|xargs command (if there's no white space in the
arguments)
Note: find descends into directories. To avoid that portably,
you can use
** "find . ! -name . -prune [...]"
* If the major part of the arguments consists of long, absolute or relative
paths, then try to move your actions into the directory:
** cd /directory/with/long/path; command *
* And another quick fix may be to match fewer arguments:
** command [a-e]*; command [f-m]*; ...
If I understand correctly the offending command, it's a _single_ call to 'sed'
with a request to perform _multiple_ substitutions, and those multiple
substitutions is the part causing "Argument list too long".
So, the fix seems to be along the
for i in *; do command "$i"; done
(simple, completely robust and portable, may be very slow)" lines, i.e.
multiple calls to 'sed' with _single_ substitution. T
The "fixed" attachment work for me, i.e. the "Argument list too long" has
disappeared, Octave builds and 'make check' OK.
The original thread can be found on nabble
<http://octave.1599824.n4.nabble.com/make-fails-with-quot-Argument-list-too-long-quot-message-td4647356.html>.
I have just made small rewriting of the messages since I have attached the
long pieces of code instead of pasting them on the report.
Carnë
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sun 13 Jan 2013 20:32:06 GMT Name: do_subst_config_vals Size: 9kB
By: carandraug
<http://savannah.gnu.org/bugs/download.php?file_id=27253>
-------------------------------------------------------
Date: Sun 13 Jan 2013 20:32:06 GMT Name: do_subst_config_vals_fix Size: 19kB
By: carandraug
<http://savannah.gnu.org/bugs/download.php?file_id=27254>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?38075>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message,
Carnë Draug <=
- Re: [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Sergei Steshenko, 2013/01/14
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Rik, 2013/01/17
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Rik, 2013/01/17
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, John W. Eaton, 2013/01/17
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Sergei Steshenko, 2013/01/17
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Rik, 2013/01/17
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Mike Miller, 2013/01/18
- [Octave-bug-tracker] [bug #38075] 'make' fails with "Argument list too long" message, Rik, 2013/01/18