All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc-cross: Argument list too long
@ 2012-04-13  6:45 Robert Yang
  2012-04-13  8:31 ` Richard Purdie
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2012-04-13  6:45 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


There would be an error when building gcc-cross in the do_install stage
if the TMPDIR's length is more than 200 characters:

make[1]: execvp: /bin/sh: Argument list too long

This is because of the limit of /usr/include/linux/limits.h:

$ grep PATH_MAX /usr/include/linux/limits.h
#define PATH_MAX        4096    /* # chars in a path name including nul */

I don't think it's worth to fix the do_install of gcc-cross, but it would
be good if we can add a check in oe-init-build-env or meta/classes
/sanity.bbclass to check wether the TMPDIR(or build directory) is longer than a 
reasonable vaule, e.g., 1/16th or 1/32th of PATH_MAX? If you are OK with this,
I'd like to work on it.

To reproduce the error:

$ cd /path/to/workdir/
$ for i in `seq 20`; do mkdir _23_5_78_; cd _23_5_78_; done
$ source /path/to/poky/oe-init-build-env
$ bitbake gcc-cross

Then the error comes.

$ pwd | wc -c
224

-- 
Thanks

Robert



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gcc-cross: Argument list too long
  2012-04-13  6:45 gcc-cross: Argument list too long Robert Yang
@ 2012-04-13  8:31 ` Richard Purdie
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Purdie @ 2012-04-13  8:31 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Fri, 2012-04-13 at 14:45 +0800, Robert Yang wrote:
> There would be an error when building gcc-cross in the do_install stage
> if the TMPDIR's length is more than 200 characters:
> 
> make[1]: execvp: /bin/sh: Argument list too long
> 
> This is because of the limit of /usr/include/linux/limits.h:
> 
> $ grep PATH_MAX /usr/include/linux/limits.h
> #define PATH_MAX        4096    /* # chars in a path name including nul */
> 
> I don't think it's worth to fix the do_install of gcc-cross, but it would
> be good if we can add a check in oe-init-build-env or meta/classes
> /sanity.bbclass to check wether the TMPDIR(or build directory) is longer than a 
> reasonable vaule, e.g., 1/16th or 1/32th of PATH_MAX? If you are OK with this,
> I'd like to work on it.
> 
> To reproduce the error:
> 
> $ cd /path/to/workdir/
> $ for i in `seq 20`; do mkdir _23_5_78_; cd _23_5_78_; done
> $ source /path/to/poky/oe-init-build-env
> $ bitbake gcc-cross
> 
> Then the error comes.
> 
> $ pwd | wc -c
> 224

I think sanity.bbclass would be a good place to have a one time check of
the length of TMPDIR...

Cheers,

Richard




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-13  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13  6:45 gcc-cross: Argument list too long Robert Yang
2012-04-13  8:31 ` Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.