NetBSD Problem Report #45397

From tsutsui@ceres.dti.ne.jp  Fri Sep 23 16:06:09 2011
Return-Path: <tsutsui@ceres.dti.ne.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 7FB8463B884
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 23 Sep 2011 16:06:09 +0000 (UTC)
Message-Id: <201109231532.p8NFW91C025519@mirage.localdomain>
Date: Sat, 24 Sep 2011 00:32:09 +0900 (JST)
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
Reply-To: tsutsui@ceres.dti.ne.jp
To: gnats-bugs@gnats.NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: make cleandir in src/lib/libc fails on CentOS host
X-Send-Pr-Version: 3.95

>Number:         45397
>Category:       toolchain
>Synopsis:       make cleandir in src/lib/libc fails on CentOS host
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Sep 23 16:10:00 +0000 2011
>Closed-Date:    Sun Sep 25 16:44:08 +0000 2011
>Last-Modified:  Sun Sep 25 16:44:08 +0000 2011
>Originator:     Izumi Tsutsui
>Release:        NetBSD 5.99.55 around 20110921
>Organization:
>Environment:
Build host: Linux 2.6.18-164.15.1.el5.028stab068.9 i686 i386 GNU/Linux
Architecture: target: mipsel
Machine: target: pmax
>Description:
build.sh -m pmax -U release on CentOS fails:
---

 :
nbmake: exec(/bin/sh) failed (Argument list too long)

*** Failed target:  __doclean
*** Failed command: bad="$(cd /usr/local/src/lib/libc && ls -d tags assym.h assym.h.tmp Lint__setjmp.c Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c errlist.c
 :
[long CLEANFILES args]
 :
yp_maplist.ln yp_master.ln yp_match.ln yp_order.ln yplib.ln yperr_string.ln ypprot_err.ln 2>/dev/null)"; if test -n "$bad"; then echo "Failed to remove files from /usr/local/src/lib/libc:" ; echo "$bad" ; false ; fi 
*** Error code 1

Stop.
 :

% /bin/sh --version
GNU bash, version 3.2.25(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
% 
---

>How-To-Repeat:
See above.

>Fix:
Split too long args for other OSes?

---
Izumi Tsutsui

>Release-Note:

>Audit-Trail:
From: Alan Barrett <apb@cequrux.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: toolchain/45397: make cleandir in src/lib/libc fails on CentOS
 host
Date: Fri, 23 Sep 2011 18:38:02 +0200

 On Fri, 23 Sep 2011, Izumi Tsutsui wrote:
 >*** Failed target:  __doclean
 >*** Failed command: bad="$(cd /usr/local/src/lib/libc && ls -d tags assym.h assym.h.tmp Lint__setjmp.c Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c errlist.c
 > :
 >[long CLEANFILES args]
 > :
 >yp_maplist.ln yp_master.ln yp_match.ln yp_order.ln yplib.ln yperr_string.ln ypprot_err.ln 2>/dev/null)"; if test -n "$bad"; then echo "Failed to remove files from /usr/local/src/lib/libc:" ; echo "$bad" ; false ; fi
 >*** Error code 1

 I guess the "- (cd ${_d} && rm -f ...) just above also failed, because
 this ls -d command is almost exactly the same length as the
 preceding rm -f command.

 >>Fix:
 >Split too long args for other OSes?

 Maybe I can do something like echo ${VERY_LONG_LIST} | xargs ...

 --apb (Alan Barrett)

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/45397: make cleandir in src/lib/libc fails on CentOShost
Date: Sun, 25 Sep 2011 07:25:21 +0900

 >  I guess the "- (cd ${_d} && rm -f ...) just above also failed, because
 >  this ls -d command is almost exactly the same length as the
 >  preceding rm -f command.

 Yes, but it was properly(?) ignored:

 ---
 nbmake: exec(/bin/sh) failed (Argument list too long)

 *** Failed target:  __doclean
 *** Failed command: (cd /usr/local/src/lib/libc && rm -f tags assym.h ...
  :
 ... yp_master.ln yp_match.ln yp_order.ln yplib.ln yperr_string.ln ypprot_err.ln) 
 *** Error code 1 (ignored)
 ---
 Izumi Tsutsui

From: "Alan Barrett" <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45397 CVS commit: src/share/mk
Date: Sun, 25 Sep 2011 11:20:41 +0000

 Module Name:	src
 Committed By:	apb
 Date:		Sun Sep 25 11:20:41 UTC 2011

 Modified Files:
 	src/share/mk: bsd.lib.mk

 Log Message:
 If the number of entries in CLEANFILES is too large, then the
 commands in bsd.clean.mk encounter errors like "exec(/bin/sh)
 failed (Argument list too long)".  Avoid that by splitting the
 files to clean into several lists using different variable names.

 This should fix PR 45397, at least until the number of files
 grows much larger.


 To generate a diff of this commit:
 cvs rdiff -u -r1.316 -r1.317 src/share/mk/bsd.lib.mk

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: PR/45397 CVS commit: src/share/mk
Date: Mon, 26 Sep 2011 01:15:13 +0900

 >  Log Message:
 >  If the number of entries in CLEANFILES is too large, then the
 >  commands in bsd.clean.mk encounter errors like "exec(/bin/sh)
 >  failed (Argument list too long)".  Avoid that by splitting the
 >  files to clean into several lists using different variable names.

 Now make cleandir in libc works fine on CentOS:
 ---
 cleandir ===> lib/libc
 (cd /usr/local/src/lib/libc && rm -f libc.a   __sigaction14_sigtramp.o __sigtramp2.o compat_ndbmdatum.o compat_setlocale1.o compat_setlocale32.o ...

  :

 ... yp_maplist.o.tmp yp_master.o.tmp yp_match.o.tmp yp_order.o.tmp yplib.o.tmp yperr_string.o.tmp ypprot_err.o.tmp || true) 
 (cd /usr/local/src/lib/libc && rm -f libc_p.a __sigaction14_sigtramp.po __sigtramp2.po compat_ndbmdatum.po compat_setlocale1.po compat_setlocale32.po ...

  :

 ...  yp_maplist.po.tmp yp_master.po.tmp yp_match.po.tmp yp_order.po.tmp yplib.po.tmp yperr_string.po.tmp ypprot_err.po.tmp || true) 
 (cd /usr/local/src/lib/libc && rm -f libc_g.a    || true) 
 (cd /usr/local/src/lib/libc && rm -f libc_pic.a libc.so.* libc.so  __sigaction14_sigtramp.pico __sigtramp2.pico compat_ndbmdatum.pico ...

  :

 ... yp_match.pico.tmp yp_order.pico.tmp yplib.pico.tmp yperr_string.pico.tmp ypprot_err.pico.tmp || true)
 (cd /usr/local/src/lib/libc && rm -f llib-lc.ln Lint_Ovfork.ln Lint__setjmp.ln Lint_bswap16.ln Lint_bswap32.ln Lint_swapcontext.ln Lint_htonl.ln ...

  :

 ... xdryp.ln yp_all.ln yp_first.ln yp_maplist.ln yp_master.ln yp_match.ln yp_order.ln yplib.ln yperr_string.ln ypprot_err.ln || true)
 (cd /usr/local/src/lib/libc && rm -f tags assym.h assym.h.tmp Lint__setjmp.c Lint_bswap16.c Lint_bswap32.c Lint_swapcontext.c errlist.c md[45]hl.c ...

  :

 ... tmp___settimeofday50.S nslexer.c nsparser.c nsparser.h a.out [Ee]rrs mklog core *.core || true)
 (cd /usr/local/src/lib/libc && rm -f getdirentries.cat3 atomic_add.cat3 atomic_and.cat3 atomic_cas.cat3 atomic_dec.cat3 atomic_inc.cat3 atomic_ops.cat3 ...

  :

 ... yperr_string.d yplib.d ypprot_err.d /usr/local/src/lib/libc/tags  || true) 
 cleandir ===> lib/i18n_module
  :
 ---

 Thanks,
 ---
 Izumi Tsutsui

State-Changed-From-To: open->closed
State-Changed-By: apb@NetBSD.org
State-Changed-When: Sun, 25 Sep 2011 16:44:08 +0000
State-Changed-Why:
confirmed fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.