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.



_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to