NetBSD Problem Report #53543

From oster@fween.ca  Tue Aug 21 15:55:33 2018
Return-Path: <oster@fween.ca>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id A0E747A16A
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 21 Aug 2018 15:55:33 +0000 (UTC)
Message-Id: <20180821155531.3F1B352D397@thog.fween.ca>
Date: Tue, 21 Aug 2018 09:55:31 -0600 (CST)
From: oster@netbsd.org
Reply-To: oster@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: devel/boost-libs fails to build on NetBSD-8.0_STABLE/amd64
X-Send-Pr-Version: 3.95

>Number:         53543
>Category:       pkg
>Synopsis:       devel/boost-libs fails to build on NetBSD-8.0_STABLE/amd64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 21 16:00:00 +0000 2018
>Closed-Date:    Sun Sep 02 13:01:40 +0000 2018
>Last-Modified:  Mon Sep 10 15:50:01 +0000 2018
>Originator:     Greg Oster
>Release:        NetBSD 8.0_STABLE
>Organization:
>Environment:


System: NetBSD thog 8.0_STABLE NetBSD 8.0_STABLE (THOG.gdb) #0: Fri Aug 17 14:42:25 CST 2018 oster@thog:/u1/builds/build186/src/obj/amd64/u1/builds/build186/src/sys/arch/amd64/compile/THOG.gdb amd64
Architecture: x86_64
Machine: amd64
>Description:

devel/boost-libs fails to build as follows:

===> Overriding tools for boost-libs-1.68.0
===> Extracting for boost-libs-1.68.0
===> Patching for boost-libs-1.68.0
=> Applying pkgsrc patches for boost-libs-1.68.0
===> Creating toolchain wrappers for boost-libs-1.68.0
===> Configuring for boost-libs-1.68.0
=> Fixing prefix.
=> Fixing install_name for Darwin.
/usr/bin/find /usr/pkgsrc/devel/boost-libs/work.thog/boost_1_68_0 -type f -exec /usr/bin/touch {} +
find: /usr/bin/touch: Argument list too long
find: /usr/bin/touch: Argument list too long
find: /usr/bin/touch: Argument list too long
find: /usr/bin/touch: Argument list too long
*** Error code 1

Stop.
make[3]: stopped in /usr/pkgsrc/devel/boost-libs
*** Error code 1




>How-To-Repeat:
 cd /usr/pkgsrc/devel/boost-libs
 make install clean

>Fix:

 Please :)  (tried multiple shells, but to no avail..)

>Release-Note:

>Audit-Trail:
From: Leonardo Taccari <leot@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/53543: devel/boost-libs fails to build on NetBSD-8.0_STABLE/amd64
Date: Tue, 21 Aug 2018 18:13:50 +0200

 Hello Greg,

 oster@netbsd.org writes:
 > >Number:         53543
 > >Category:       pkg
 > >Synopsis:       devel/boost-libs fails to build on NetBSD-8.0_STABLE/am=
 d64
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       high
 > >Responsible:    pkg-manager
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Tue Aug 21 16:00:00 +0000 2018
 > >Originator:     Greg Oster
 > >Release:        NetBSD 8.0_STABLE
 > >Organization:
 > >Environment:
 >
 > [...]
 >
 > devel/boost-libs fails to build as follows:
 >
 > =3D=3D=3D> Overriding tools for boost-libs-1.68.0
 > =3D=3D=3D> Extracting for boost-libs-1.68.0
 > =3D=3D=3D> Patching for boost-libs-1.68.0
 > =3D> Applying pkgsrc patches for boost-libs-1.68.0
 > =3D=3D=3D> Creating toolchain wrappers for boost-libs-1.68.0
 > =3D=3D=3D> Configuring for boost-libs-1.68.0
 > =3D> Fixing prefix.
 > =3D> Fixing install_name for Darwin.
 > /usr/bin/find /usr/pkgsrc/devel/boost-libs/work.thog/boost_1_68_0 -type =
 f -exec /usr/bin/touch {} +
 > find: /usr/bin/touch: Argument list too long
 > find: /usr/bin/touch: Argument list too long
 > find: /usr/bin/touch: Argument list too long
 > find: /usr/bin/touch: Argument list too long
 > *** Error code 1
 > [...]

 I think that reverting -r1.74 of pkgsrc/meta-pkgs/boost/Makefile.common
 will do the trick (change the `\;' with a `+' when invoking ${FIND}
 in pre-configure target) , i.e.:

  Index: Makefile.common
  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
  RCS file: /cvsroot/pkgsrc/meta-pkgs/boost/Makefile.common,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -p -r1.73 -r1.74
  --- Makefile.common	30 Apr 2018 00:21:12 -0000	1.73
  +++ Makefile.common	2 Jul 2018 20:32:09 -0000	1.74
  @@ -1,4 +1,4 @@
  -# $NetBSD: Makefile.common,v 1.73 2018/04/30 00:21:12 ryoon Exp $
  +# $NetBSD: Makefile.common,v 1.74 2018/07/02 20:32:09 adam Exp $
   #
   # used by devel/boost-build/Makefile
   # used by devel/boost-docs/Makefile
  @@ -89,7 +89,7 @@ post-wrapper:
   # We can't do this at post-extract because the extract cookie will get a=
  future
   # timestamp than the sources.  If this happens, print-PLIST does not wor=
 k.
   pre-configure:
  -	${FIND} ${WRKSRC} -type f -exec ${TOUCH} {} \;
  +	${FIND} ${WRKSRC} -type f -exec ${TOUCH} {} +
   =

   # Generate a new user.hpp or use the installed one, depending on the pac=
 kage
   # we are building.

From: Greg Oster <oster@netbsd.org>
To: Leonardo Taccari <leot@NetBSD.org>
Cc: gnats-bugs@NetBSD.org, pkg-manager@netbsd.org, gnats-admin@netbsd.org,
 pkgsrc-bugs@netbsd.org
Subject: Re: pkg/53543: devel/boost-libs fails to build on
 NetBSD-8.0_STABLE/amd64
Date: Tue, 21 Aug 2018 10:27:04 -0600

 On Tue, 21 Aug 2018 16:15:01 +0000 (UTC)
 Leonardo Taccari <leot@NetBSD.org> wrote:

 > The following reply was made to PR pkg/53543; it has been noted by
 > GNATS.
 > 
 > From: Leonardo Taccari <leot@NetBSD.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/53543: devel/boost-libs fails to build on
 > NetBSD-8.0_STABLE/amd64 Date: Tue, 21 Aug 2018 18:13:50 +0200
 > 
 >  Hello Greg,
 >  
 >  oster@netbsd.org writes:
 >  > >Number:         53543
 >  > >Category:       pkg
 >  > >Synopsis:       devel/boost-libs fails to build on
 >  > >NetBSD-8.0_STABLE/am=  
 >  d64
 >  > >Confidential:   no
 >  > >Severity:       serious
 >  > >Priority:       high
 >  > >Responsible:    pkg-manager
 >  > >State:          open
 >  > >Class:          sw-bug
 >  > >Submitter-Id:   net
 >  > >Arrival-Date:   Tue Aug 21 16:00:00 +0000 2018
 >  > >Originator:     Greg Oster
 >  > >Release:        NetBSD 8.0_STABLE
 >  > >Organization:
 >  > >Environment:  
 >  >
 >  > [...]
 >  >
 >  > devel/boost-libs fails to build as follows:
 >  >  
 >  > =3D=3D=3D> Overriding tools for boost-libs-1.68.0
 >  > =3D=3D=3D> Extracting for boost-libs-1.68.0
 >  > =3D=3D=3D> Patching for boost-libs-1.68.0
 >  > =3D> Applying pkgsrc patches for boost-libs-1.68.0
 >  > =3D=3D=3D> Creating toolchain wrappers for boost-libs-1.68.0
 >  > =3D=3D=3D> Configuring for boost-libs-1.68.0
 >  > =3D> Fixing prefix.
 >  > =3D> Fixing install_name for Darwin.  
 >  > /usr/bin/find /usr/pkgsrc/devel/boost-libs/work.thog/boost_1_68_0
 >  > -type =  
 >  f -exec /usr/bin/touch {} +
 >  > find: /usr/bin/touch: Argument list too long
 >  > find: /usr/bin/touch: Argument list too long
 >  > find: /usr/bin/touch: Argument list too long
 >  > find: /usr/bin/touch: Argument list too long
 >  > *** Error code 1
 >  > [...]  
 >  
 >  I think that reverting -r1.74 of
 > pkgsrc/meta-pkgs/boost/Makefile.common will do the trick (change the
 > `\;' with a `+' when invoking ${FIND} in pre-configure target) , i.e.:
 >  
 >   Index: Makefile.common
 >   =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 >  =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 >   RCS file: /cvsroot/pkgsrc/meta-pkgs/boost/Makefile.common,v
 >   retrieving revision 1.73
 >   retrieving revision 1.74
 >   diff -u -p -r1.73 -r1.74
 >   --- Makefile.common	30 Apr 2018 00:21:12 -0000	1.73
 >   +++ Makefile.common	2 Jul 2018 20:32:09 -0000	1.74
 >   @@ -1,4 +1,4 @@
 >   -# $NetBSD: Makefile.common,v 1.73 2018/04/30 00:21:12 ryoon Exp $
 >   +# $NetBSD: Makefile.common,v 1.74 2018/07/02 20:32:09 adam Exp $
 >    #
 >    # used by devel/boost-build/Makefile
 >    # used by devel/boost-docs/Makefile
 >   @@ -89,7 +89,7 @@ post-wrapper:
 >    # We can't do this at post-extract because the extract cookie will
 > get a= future
 >    # timestamp than the sources.  If this happens, print-PLIST does
 > not wor= k.
 >    pre-configure:
 >   -	${FIND} ${WRKSRC} -type f -exec ${TOUCH} {} \;
 >   +	${FIND} ${WRKSRC} -type f -exec ${TOUCH} {} +
 >    =
 >  
 >    # Generate a new user.hpp or use the installed one, depending on
 > the pac= kage
 >    # we are building.
 >  

 That certainly did the trick!

 Thanks for your super-fast response!

 Later...

 Greg Oster

From: Benny Siegert <bsiegert@gmail.com>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org, 
	oster@netbsd.org
Subject: Re: pkg/53543: devel/boost-libs fails to build on NetBSD-8.0_STABLE/amd64
Date: Sat, 1 Sep 2018 21:00:59 +0000

 On Tue, Aug 21, 2018 at 4:15 PM Leonardo Taccari <leot@netbsd.org> wrote:

 >  I think that reverting -r1.74 of pkgsrc/meta-pkgs/boost/Makefile.common
 >  will do the trick (change the `\;' with a `+' when invoking ${FIND}
 >  in pre-configure target) , i.e.:

 Did you commit this, Leonardo?

 -- 
 Benny

From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53543 CVS commit: pkgsrc/meta-pkgs/boost
Date: Sat, 1 Sep 2018 21:21:47 +0000

 Module Name:	pkgsrc
 Committed By:	leot
 Date:		Sat Sep  1 21:21:47 UTC 2018

 Modified Files:
 	pkgsrc/meta-pkgs/boost: Makefile.common

 Log Message:
 boost: Revert -r1.74 in order to avoid PR pkg/53543

 At least devel/boost-libs can fail due an `Argument list too long' due the use
 of `+' in ${FIND}. Revert -r1.74 in order to use `\;' instead (and add a big XXX
 comment regarding that).


 To generate a diff of this commit:
 cvs rdiff -u -r1.75 -r1.76 pkgsrc/meta-pkgs/boost/Makefile.common

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

From: Joerg Sonnenberger <joerg@bec.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	oster@netbsd.org
Subject: Re: PR/53543 CVS commit: pkgsrc/meta-pkgs/boost
Date: Sun, 2 Sep 2018 00:39:13 +0200

 On Sat, Sep 01, 2018 at 09:25:01PM +0000, Leonardo Taccari wrote:
 > The following reply was made to PR pkg/53543; it has been noted by GNATS.
 > 
 > From: "Leonardo Taccari" <leot@netbsd.org>
 > To: gnats-bugs@gnats.NetBSD.org
 > Cc: 
 > Subject: PR/53543 CVS commit: pkgsrc/meta-pkgs/boost
 > Date: Sat, 1 Sep 2018 21:21:47 +0000
 > 
 >  Module Name:	pkgsrc
 >  Committed By:	leot
 >  Date:		Sat Sep  1 21:21:47 UTC 2018
 >  
 >  Modified Files:
 >  	pkgsrc/meta-pkgs/boost: Makefile.common
 >  
 >  Log Message:
 >  boost: Revert -r1.74 in order to avoid PR pkg/53543
 >  
 >  At least devel/boost-libs can fail due an `Argument list too long' due the use
 >  of `+' in ${FIND}. Revert -r1.74 in order to use `\;' instead (and add a big XXX
 >  comment regarding that).

 Can't we just find | xargs ${TOUCH} here instead as workaround?

 Joerg

From: "Leonardo Taccari" <leot@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53543 CVS commit: pkgsrc/meta-pkgs/boost
Date: Sun, 2 Sep 2018 12:53:36 +0000

 Module Name:	pkgsrc
 Committed By:	leot
 Date:		Sun Sep  2 12:53:36 UTC 2018

 Modified Files:
 	pkgsrc/meta-pkgs/boost: Makefile.common

 Log Message:
 boost: Use XARGS instead of -exec of FIND to properly address PR pkg/53543

 This should properly fix PR pkg/53543 (also remove the big `XXX'
 comment, this is a proper solution to the problem).

 Thanks to <joerg> for suggesting that!


 To generate a diff of this commit:
 cvs rdiff -u -r1.76 -r1.77 pkgsrc/meta-pkgs/boost/Makefile.common

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

State-Changed-From-To: open->closed
State-Changed-By: leot@NetBSD.org
State-Changed-When: Sun, 02 Sep 2018 13:01:40 +0000
State-Changed-Why:
Problem fixed.

meta-pkgs/boost/Makefile.common is -r1.73 so no needs to pull
up this change.

Thank you Greg for the PR and feedback and thanks to Benny
for pinging me and Joerg for suggesting a better fix!


From: "Robert Elz" <kre@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53543 CVS commit: src/usr.bin/find
Date: Tue, 4 Sep 2018 15:16:15 +0000

 Module Name:	src
 Committed By:	kre
 Date:		Tue Sep  4 15:16:15 UTC 2018

 Modified Files:
 	src/usr.bin/find: function.c

 Log Message:
 Inspired by PR pkg/53543

 When calculating the length of the args that can be
 appended in a "find .... -exec something {} +"
 usage, remember to allow for the arg pointers, which
 form part of what is allowed in ARG_MAX.

 From a fairly empty installation of HEAD on amd64
 and with a "/tmp/args" command that simply prints
 its arg count, and the length of the arg strings,
 with this mod I see ..

 netbsd# find / -exec /tmp/args {} +
 Argc 5000 Arglen 107645
 Argc 5000 Arglen 151324
 Argc 5000 Arglen 187725
 Argc 5000 Arglen 206591
 Argc 5000 Arglen 172909
 Argc 5000 Arglen 186264
 Argc 5000 Arglen 167906
 Argc 2881 Arglen 98260

 The upper limit of 5000 args is in the code.

 Using the biggest of those, 5000
 args, plus 206591 bytes of strings
 uses 246591 bytes total (this excludes
 the command name, so add a few more).
 That's fairly close to the ARG_MAX
 of 262144.

 On another system (with longer paths) I see:
 (this is just a small part of the output, using a
 different version of the dummy command, and a
 slightly different invocation)

 Args: 4546 Len 218030
 Args: 4878 Len 217991
 Args: 4813 Len 218028
 Args: 4803 Len 218029

 There, 4878*8 + 217991 == 257015 which is about
 as close as we'd want to come to the arg limit.

 XXX pullup -8


 To generate a diff of this commit:
 cvs rdiff -u -r1.76 -r1.77 src/usr.bin/find/function.c

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

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/53543 CVS commit: [netbsd-8] src/usr.bin/find
Date: Mon, 10 Sep 2018 15:48:26 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Mon Sep 10 15:48:25 UTC 2018

 Modified Files:
 	src/usr.bin/find [netbsd-8]: function.c

 Log Message:
 Pull up following revision(s) (requested by kre in ticket #1016):

 	usr.bin/find/function.c: revision 1.77

 Inspired by PR pkg/53543

 When calculating the length of the args that can be
 appended in a "find .... -exec something {} +"
 usage, remember to allow for the arg pointers, which
 form part of what is allowed in ARG_MAX.

 From a fairly empty installation of HEAD on amd64
 and with a "/tmp/args" command that simply prints
 its arg count, and the length of the arg strings,
 with this mod I see ..

 netbsd# find / -exec /tmp/args {} +
 Argc 5000 Arglen 107645
 Argc 5000 Arglen 151324
 Argc 5000 Arglen 187725
 Argc 5000 Arglen 206591
 Argc 5000 Arglen 172909
 Argc 5000 Arglen 186264
 Argc 5000 Arglen 167906
 Argc 2881 Arglen 98260

 The upper limit of 5000 args is in the code.

 Using the biggest of those, 5000
 args, plus 206591 bytes of strings
 uses 246591 bytes total (this excludes
 the command name, so add a few more).

 That's fairly close to the ARG_MAX
 of 262144.

 On another system (with longer paths) I see:
 (this is just a small part of the output, using a
 different version of the dummy command, and a
 slightly different invocation)

 Args: 4546 Len 218030
 Args: 4878 Len 217991
 Args: 4813 Len 218028
 Args: 4803 Len 218029

 There, 4878*8 + 217991 == 257015 which is about
 as close as we'd want to come to the arg limit.

 XXX pullup -8


 To generate a diff of this commit:
 cvs rdiff -u -r1.75.8.1 -r1.75.8.2 src/usr.bin/find/function.c

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

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.