Skip to contentSkip to conversation

tar: fix for len(TMPDIR) = 410 build

PATCH In review Robert Yang 3 participants 5 messages Mar 12, 2015 – Mar 13, 2015

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index fb5db78..de2ed31 100644
@@ -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
#2 lore raw

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

#3 lore raw

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:

http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/autotools.bbclass?id=3c58f92d46e32c40b80575f14e0f6f66c9920c66

Cheers,

Richard

#4 lore raw

Re: [PATCH 1/1] tar: set acpaths to avoid "Argument list too long" error

In reply to Burton, Ross
Quoted 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