tar: fix for len(TMPDIR) = 410 build
cover tar: fix for len(TMPDIR) = 410 build
The following changes since commit 99f209a49a4390192b95184ff86bd6f973010111:
layer.conf: bump version as error-report interface changed (2015-03-10 17:44:56 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib rbt/tar
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/tar
Chong Lu (1):
tar: set acpaths to avoid "Argument list too long" error
meta/recipes-extended/tar/tar.inc | 6 ++++++ 1 file changed, 6 insertions(+)
Signature · 1 line
1.7.9.5
PATCH 1/1 tar: set acpaths to avoid "Argument list too long" error
From: Chong Lu <[email protected]>
There would be an error when the TMPDIR is long/deep, for example when len(TMPDIR) = 410 while our supported longest value is 410:
aclocal: error: cannot open xxx
autoreconf: aclocal failed with exit status: 1
ERROR: autoreconf execution failed.
Let aclocal use the relative path for the m4 file rather than the absolute would fix the problem.
[YOCTO #6138]
--- meta/recipes-extended/tar/tar.inc | 6 ++++++ 1 file changed, 6 insertions(+)
meta/recipes-extended/tar/tar.inc +6 -0
@@ -10,6 +10,12 @@ inherit autotools gettext texinfo EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}" +# Let aclocal use the relative path for the m4 file rather than the +# absolute since tar has a lot of m4 files, otherwise there might +# be an "Argument list too long" error when it is built in a long/deep +# directory. +acpaths = "-I ./m4" + EXTRAINSTALL = "do_install_extra" EXTRAINSTALL_class-nativesdk = ""
Signature · 1 line
1.7.9.5
Re: [PATCH 1/1] tar: set acpaths to avoid "Argument list too long" error
Quoted 2 lines · Robert Yang
+acpaths = "-I ./m4"
Why does this only happen on tar? Why is it safe to pass just -I ./m4 when the detected list that you're overriding is effectively -I ./m4 -I ./tests?
Would it be better to just make all include paths relative to ${S} when generating the acpaths?
Ross
Re: [PATCH 1/1] tar: set acpaths to avoid "Argument list too long" error
Quoted 10 lines · Ross
On 12 March 2015 at 06:14, Robert Yang <[email protected]> wrote:
+acpaths = "-I ./m4"Why does this only happen on tar? Why is it safe to pass just -I ./m4 when the detected list that you're overriding is effectively -I ./m4 -I ./tests?
Would it be better to just make all include paths relative to ${S} when generating the acpaths?
We tried that. Subconfigures break:
Cheers,
Richard
Re: [PATCH 1/1] tar: set acpaths to avoid "Argument list too long" error
In reply to Burton, RossQuoted 9 lines · Ross
On 12 March 2015 at 06:14, Robert Yang <[email protected] <mailto:[email protected]>> wrote:
+acpaths = "-I ./m4"Why does this only happen on tar? Why is it safe to pass just -I ./m4 when the detected list that you're overriding is effectively -I ./m4 -I ./tests?
Not only tar has this problem, but also other recipes such as coreutils, because they have many 4 files, but we have fixed that others bfore, for example:
commit 238e9b54e228b850434f7d503870e86cfb12b775
Author: Robert Yang <[email protected]> Date: Sun Sep 15 09:13:12 2013 +0000
coreutils: set acpaths to avoid "Argument list too long" error
Now I tested the build in the deep directory again, only found tar failed, and Chong had made a patch for it.
If we don't set 'acpaths = "-I ./m4"', then it would use the absolute path, which would be too long, here is the related code in autotools.bbclass for acpaths:
acpaths = "default"
[snip]
ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/"
if [ x"${acpaths}" = xdefault ]; then
acpaths=
for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
acpaths="$acpaths -I $i"
done
else
acpaths="${acpaths}"
fi
I think it's safe to set acpaths = "-I ./m4" as we had done for coreutils.
// Robert
Quoted 5 lines
Would it be better to just make all include paths relative to ${S} when generating the acpaths?
Ross