Bug 2434 - sanity.bbclass: check TMPDIR is not too long
Summary: sanity.bbclass: check TMPDIR is not too long
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.3 M2
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard: Patch Review 30%
Depends on: 2639 2640 2664 2688 2689
Blocks:
  Show dependency tree
 
Reported: 2012-05-08 02:47 UTC by Robert Yang
Modified: 2012-07-13 10:27 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2012-05-08 02:47:03 UTC
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 a reasonable value.
Comment 1 Saul Wold 2012-05-10 23:06:59 UTC
This is the wrong approach, please consider the approach looking at the gcc recipe and use the @.
Comment 2 Robert Yang 2012-05-11 01:15:43 UTC
(In reply to comment #1)
> This is the wrong approach, please consider the approach looking at the gcc
> recipe and use the @.

Hi Saul,
I'm sorry, but I don't quite understand what did you mean, I had sent pull request for it, and there is the discussion about the gcc's recipe, the pull request is in the oe-core, would you please take a look at it? And the title is:
sanity.bbclass: check TMPDIR is not too long
Comment 3 Robert Yang 2012-07-10 01:56:57 UTC
Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2dee999ab2731c2a96e82762ae04fe44f27edac6

The length can not be longer than 410 currently.
Comment 4 Yi Zhao 2012-07-13 10:27:42 UTC
Verified with 1.3 m2 rc1.
git info: eb0cb7e8234f5d2e5623406e9660be91cf52f65e

Create a build directory, the length is longer than 410. Run "bitbake core-image-sato" will get following error message:

##########
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    The length of TMPDIR is longer than 410, this would cause unexpected errors, please use a shorter path.
Failed to fetch test data from the network. Please ensure your network is configured correctly.
##########

When the length of TMPDIR less than 410, "bitbake core-image-sato" can run without problem.