Skip to contentSkip to conversation

ARM Fix /usr/bin/xargs: etags: Argument list too long

RFC PATCH Superseded David Cullen 2 participants 3 messages Aug 8, 2012

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ARM Fix /usr/bin/xargs: etags: Argument list too long

Patch applies to

    commit 42a579a0f960081cd16fc945036e4780c3ad3202

When running "make ARCH=arm TAGS" in a chroot using qemu-arm-static, the following message is emitted:

[user@host:/home/work/linux]: make ARCH=arm TAGS
GEN TAGS
/usr/bin/xargs: etags: Argument list too long

This can be fixed by by passing "-L 1024" to xargs in scripts/tags.sh.

The "1024" was a guess. A value of "3862" changes the message to

/usr/bin/xargs: argument list too long

Using "2048" also fixes the problem. However, I don't know how much headroom that leaves

Does anyone know why the argument lists must be shorter for ARM? All of the documentation I have available says that 4096 should be the limit.

---
 scripts/tags.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/tags.sh +1 -1
index cff8faa..7f4ebb3 100755
@@ -121,7 +121,7 @@ dogtags()
 
 exuberant()
 {
-       all_sources | xargs $1 -a                               \
+       all_sources | xargs -L 1024 $1 -a                       \
        -I __initdata,__exitdata,__acquires,__releases          \
        -I __read_mostly,____cacheline_aligned                  \
        -I ____cacheline_aligned_in_smp                         \

--
1.7.9.5

#1 lore raw

Dne 8.8.2012 16:32, David Cullen napsal(a):

Quoted 15 lines

Patch applies to

    commit 42a579a0f960081cd16fc945036e4780c3ad3202

When running "make ARCH=arm TAGS" in a chroot using qemu-arm-static, the following message is emitted:

[user@host:/home/work/linux]: make ARCH=arm TAGS
GEN TAGS
/usr/bin/xargs: etags: Argument list too long

This can be fixed by by passing "-L 1024" to xargs in scripts/tags.sh.

The "1024" was a guess. A value of "3862" changes the message to

Quoted 8 lines

/usr/bin/xargs: argument list too long

Using "2048" also fixes the problem. However, I don't know how much headroom that leaves

Does anyone know why the argument lists must be shorter for ARM? All of the documentation I have available says that 4096 should be the limit.

This looks like a bug in xargs, it should make sure that the commandline fits into ARG_MAX. BTW, a better workaround would be to use the -s option, which limits the size of the argument list.

Michal

#2 lore raw
Quoted 21 lines · Michal Marek

Dne 8.8.2012 16:32, David Cullen napsal(a):

Quoted 20 lines

Patch applies to

    commit 42a579a0f960081cd16fc945036e4780c3ad3202

When running "make ARCH=arm TAGS" in a chroot using qemu-arm-static, the following message is emitted:

[user@host:/home/work/linux]: make ARCH=arm TAGS
GEN TAGS
/usr/bin/xargs: etags: Argument list too long

This can be fixed by by passing "-L 1024" to xargs in scripts/tags.sh.

The "1024" was a guess. A value of "3862" changes the message to

/usr/bin/xargs: argument list too long

Using "2048" also fixes the problem. However, I don't know how much headroom that leaves

Quoted 6 lines
Quoted 3 lines

Does anyone know why the argument lists must be shorter for ARM? All of the documentation I have available says that 4096 should be the limit.

This looks like a bug in xargs, it should make sure that the commandline fits into ARG_MAX.

Actually, it appears to be caused by the combination of qemu-arm-static and xargs. When I run "make ARCH=arm TAGS" on an ARM target, I do not see the problem.

Quoted 2 lines

BTW, a better workaround would be to use the -s option, which limits the size of the argument list.

That works.

I'll submit another RFC patch.

Signature · 2 lines
Thank you,
David Cullen