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.
This is the wrong approach, please consider the approach looking at the gcc recipe and use the @.
(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
Merged into master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=2dee999ab2731c2a96e82762ae04fe44f27edac6 The length can not be longer than 410 currently.
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.