Bug 184210 - [FIX] multimedia/tstools requires MAKE_JOBS_UNSAFE=yes
Summary: [FIX] multimedia/tstools requires MAKE_JOBS_UNSAFE=yes
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-24 12:40 UTC by Oliver Fromme
Modified: 2013-11-27 15:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Fromme 2013-11-24 12:40:00 UTC
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.

Fix: 

Add this line to the port's Makefile:

MAKE_JOBS_UNSAFE= yes
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.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-11-24 12:40:08 UTC
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
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2013-11-24 12:40:09 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 J.R. Oldroyd 2013-11-24 15:29:46 UTC
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=ports/184210
> 


I have no problem with this suggested fix.  Please commit it.

	-jr
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2013-11-24 23:46:21 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-11-27 15:05:40 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"
Comment 6 Philippe Audeoud freebsd_committer freebsd_triage 2013-11-27 15:07:12 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!