From olli@grabthar.secnetix.de  Sun Nov 24 12:34:53 2013
Return-Path: <olli@grabthar.secnetix.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id A4979C62
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Nov 2013 12:34:53 +0000 (UTC)
Received: from grabthar.secnetix.de (grabthar.secnetix.de [IPv6:2a01:170:102f::1])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 2211F2F26
	for <FreeBSD-gnats-submit@freebsd.org>; Sun, 24 Nov 2013 12:34:52 +0000 (UTC)
Received: from grabthar.secnetix.de (localhost [127.0.0.1])
	by grabthar.secnetix.de (8.14.7/8.14.7) with ESMTP id rAOCYo7W041219;
	Sun, 24 Nov 2013 13:34:50 +0100 (CET)
	(envelope-from oliver.fromme@secnetix.de)
Received: (from olli@localhost)
	by grabthar.secnetix.de (8.14.7/8.14.7/Submit) id rAOCYowv041218;
	Sun, 24 Nov 2013 13:34:50 +0100 (CET)
	(envelope-from olli)
Message-Id: <201311241234.rAOCYowv041218@grabthar.secnetix.de>
Date: Sun, 24 Nov 2013 13:34:50 +0100 (CET)
From: Oliver Fromme <oliver.fromme@secnetix.de>
Reply-To: Oliver Fromme <oliver.fromme@secnetix.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc: Oliver Fromme <olli@secnetix.de>
Subject: [FIX] multimedia/tstools requires MAKE_JOBS_UNSAFE=yes
X-Send-Pr-Version: 3.114
X-GNATS-Notify: fbsd@opal.com

>Number:         184210
>Category:       ports
>Synopsis:       [FIX] multimedia/tstools requires MAKE_JOBS_UNSAFE=yes
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Nov 24 12:40:00 UTC 2013
>Closed-Date:    Wed Nov 27 15:07:15 UTC 2013
>Last-Modified:  Wed Nov 27 15:10:00 UTC 2013
>Originator:     Oliver Fromme
>Release:        FreeBSD 9.1-STABLE amd64
>Organization:
secnetix GmbH & Co. KG
		http://www.secnetix.de/bsd
>Environment:

The behaviour described occurs on my 6-core AMD Phenom II X6
with SMP enabled.  However, I could not reproduce it on a
2-core Intel Atom system.

>Description:

Building the port multimedia/tstools on my 6-way SMP system
breaks in various, non-reproducible ways, most of the time.
Apparently it is not able to work correctly with multiple
make jobs.  For example:

cc obj/pcapreport.o -o bin/pcapreport -g -lm   -Llib -ltstools 
obj/pcapreport.o: In function `main':
pcapreport.c:(.text+0x453): undefined reference to `ethernet_packet_from_pcap'
gmake: *** [bin/pcapreport] Error 1

Or:

cc obj/ts2es.o -o bin/ts2es -g -lm   -Llib -ltstools 
obj/esfilter.o: In function `main':
esfilter.c:(.text+0x126e): undefined reference to `tswrite_open'
gmake: *** [bin/esfilter] Error 1

Or various other ways.  Sometimes the build succeeds (about
24% of the time).

Adding the following line to the Makefile fixes it:

MAKE_JOBS_UNSAFE= yes

With that line, the port builds fine reproducible on all
systems that I've tried.

>How-To-Repeat:

Try to build multimedia/tstools on a 6-way SMP system.
However, whether the problem occurs or not seems to depend
on the number of cores, and maybe it also depends on timing
and other things.  Sometimes it even succeeds on the same
system.

On my 6-way system (AMD Phenom II X6) the problem occured
about 75% of the time.  On a 2-way system (Intel Atom) that
I've tried, however, the port built just fine on three
consecutive attempts.

>Fix:

Add this line to the port's Makefile:

MAKE_JOBS_UNSAFE= yes
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Sun Nov 24 12:40:09 UTC 2013 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184210 

From: Edwin Groothuis <edwin@FreeBSD.org>
To: fbsd@opal.com
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/184210: [FIX] multimedia/tstools requires MAKE_JOBS_UNSAFE=yes
Date: Sun, 24 Nov 2013 12:40:08 UT

 Maintainer of multimedia/tstools,
 
 Please note that PR ports/184210 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184210
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "J.R. Oldroyd" <fbsd@opal.com>
To: bug-followup@FreeBSD.ORG
Cc: edwin@FreeBSD.ORG
Subject: Re: ports/184210: [FIX] multimedia/tstools requires
 MAKE_JOBS_UNSAFE=yes
Date: Sun, 24 Nov 2013 10:29:46 -0500

 --Sig_/jTE_BdvdQH6FlGv0vjMBh0o
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: quoted-printable
 
 On Sun, 24 Nov 2013 12:40:08 UT Edwin Groothuis <edwin@FreeBSD.ORG> wrote:
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/184210
 >=20
 
 I have no problem with this suggested fix.  Please commit it.
 
 	-jr
 
 --Sig_/jTE_BdvdQH6FlGv0vjMBh0o
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Disposition: attachment; filename=signature.asc
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (FreeBSD)
 
 iEYEARECAAYFAlKSG3oACgkQls33urr0k4lclQCff34SN6K2OPbllVzl5nyGf4J8
 g9MAoJtHTUVKMESZs0juZ8+clpegaSaz
 =HBvi
 -----END PGP SIGNATURE-----
 
 --Sig_/jTE_BdvdQH6FlGv0vjMBh0o--
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sun Nov 24 23:46:21 UTC 2013 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184210 
State-Changed-From-To: open->closed 
State-Changed-By: jadawin 
State-Changed-When: Wed Nov 27 15:07:12 UTC 2013 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=184210 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/184210: commit references a PR
Date: Wed, 27 Nov 2013 15:05:40 +0000 (UTC)

 Author: jadawin
 Date: Wed Nov 27 15:05:34 2013
 New Revision: 335020
 URL: http://svnweb.freebsd.org/changeset/ports/335020
 
 Log:
   - Mark MAKE_JOBS_UNSAFE=yes
   - While here support STAGEDIR
   
   PR:		ports/184210
   Submitted by:	Oliver Fromme <oliver.fromme@secnetix.de>
   Approved by:	maintainer
 
 Modified:
   head/multimedia/tstools/Makefile   (contents, props changed)
 
 Modified: head/multimedia/tstools/Makefile
 ==============================================================================
 --- head/multimedia/tstools/Makefile	Wed Nov 27 14:58:29 2013	(r335019)
 +++ head/multimedia/tstools/Makefile	Wed Nov 27 15:05:34 2013	(r335020)
 @@ -13,6 +13,8 @@ COMMENT=	MPEG transport, program, and el
  
  LICENSE=	MPL
  
 +MAKE_JOBS_UNSAFE=	yes
 +
  USES=		gmake
  MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}"
  
 @@ -22,15 +24,14 @@ PORTDOCS=	*
  
  OPTIONS_DEFINE=	DOCS
  
 -NO_STAGE=	yes
  .include <bsd.port.options.mk>
  
  do-install:
 -	${CP} ${WRKSRC}/bin/* ${PREFIX}/bin
 -	${CP} ${WRKSRC}/lib/* ${PREFIX}/lib
 +	${CP} ${WRKSRC}/bin/* ${STAGEDIR}${PREFIX}/bin
 +	${CP} ${WRKSRC}/lib/* ${STAGEDIR}${PREFIX}/lib
  .if ${PORT_OPTIONS:MDOCS}
 -	@${MKDIR} ${DOCSDIR}
 -	${CP} ${WRKSRC}/docs/* ${DOCSDIR}
 +	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 +	${CP} ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR}
  .endif
  
  .include <bsd.port.mk>
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
