From: Phil Blundell <philb@gnu.org>
To: Patches and discussions about the oe-core layer
<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] sanity.bbclass: check TMPDIR is not too long
Date: Tue, 08 May 2012 08:14:31 +0100 [thread overview]
Message-ID: <1336461271.3181.93.camel@x121e.pbcl.net> (raw)
In-Reply-To: <228b3adfffa660477cc65e00fc32c95f2bf976fd.1336445265.git.liezhi.yang@windriver.com>
On Tue, 2012-05-08 at 10:50 +0800, Robert Yang wrote:
> When the length of TMPDIR is longer than a threshold, there would be an
> "Argument list too long" error when building gcc-cross, this is the
> error from the exec(), the maximum length of argument is defined in
> /usr/include/linux/limits.h:
>
> #define ARG_MAX 131072 /* # bytes of args + environ for exec() */
>
> It's hard to determine the threshold of the TMPDIR, here is the
> experimental value:
> len(TMPDIR) = 182 Success
> len(TMPDIR) = 192 Failed
>
> So set the maximum length of TMPDIR to 180 seems proper.
It seems a bit lame for paths to be restricted to such a short length.
How does a 192-byte TMPDIR end up causing more than 131072 bytes of
arguments and environment? Can anything be done to reduce that? For
example, can you use "gcc @..." to remove common options from the
command line? Can you eliminate garbage from the environment that
doesn't need to be there?
p.
next prev parent reply other threads:[~2012-05-08 7:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 2:50 [PATCH 0/1] sanity.bbclass: check TMPDIR is not too long Robert Yang
2012-05-08 2:50 ` [PATCH 1/1] " Robert Yang
2012-05-08 3:00 ` Robert Yang
2012-05-08 7:14 ` Phil Blundell [this message]
2012-05-08 9:58 ` Robert Yang
2012-05-22 10:27 ` Robert Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336461271.3181.93.camel@x121e.pbcl.net \
--to=philb@gnu.org \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox