From nobody@FreeBSD.org  Wed Mar  5 04:04:45 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 640401065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Mar 2008 04:04:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 4DEC88FC24
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Mar 2008 04:04:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2541ic7055808
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 5 Mar 2008 04:01:44 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2541iCx055807;
	Wed, 5 Mar 2008 04:01:44 GMT
	(envelope-from nobody)
Message-Id: <200803050401.m2541iCx055807@www.freebsd.org>
Date: Wed, 5 Mar 2008 04:01:44 GMT
From: Josh Carroll <josh.carroll@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ushare should link to pthread in FreeBSD 7.0+
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: votdev@gmx.de

>Number:         121378
>Category:       ports
>Synopsis:       net/ushare should link to pthread in FreeBSD 7.0+
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 05 04:10:00 UTC 2008
>Closed-Date:    Sat Mar 08 18:36:03 UTC 2008
>Last-Modified:  Sat Mar  8 18:40:01 UTC 2008
>Originator:     Josh Carroll
>Release:        7.0-RELEASE
>Organization:
n/a
>Environment:
FreeBSD pflog.net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Feb 26 01:20:52 EST 2008     root@pflog.net:/usr/obj/usr/src/sys/PFLOG  amd64

>Description:
I have been tracking a problem with ushare when run on amd64/FreeBSD 7.0-RELEASE. Namely, when it is started with -D, it never listens on the upnp port/socket, and appears to hang in a pthread call.

I filed a PR against libthr, but it turns out the solution is simply to compile ushare with -lpthread (or -pthread). This is done for other FreeBSD releases, so I am requesting that:

.if ${OSVERSION} < 700042
CFLAGS+=    ${PTHREAD_LIBS}
.endif

Be removed, so that all versions include -pthread:

CFLAGS+=    ${PTHREAD_LIBS}

I have tested this and recompiling with the above changes fixes ushare when it is run as a daemon.

Thanks!
Josh
>How-To-Repeat:
- build and install ushare on amd64/FreeBSD 7.0
- run ushare -D
- note the lack of listening socket in sockstat -4l output
>Fix:
The attached patch file just comments out the

Patch attached with submission follows:

--- Makefile	2008-03-04 23:02:05.000000000 -0500
+++ Makefile.new	2008-03-04 23:03:53.000000000 -0500
@@ -29,9 +29,7 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 700042
 CFLAGS+=	${PTHREAD_LIBS}
-.endif
 
 do-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Wed Mar 5 05:09:05 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: "Volker Theile" <votdev@gmx.de>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/121378: net/ushare should link to pthread in FreeBSD 7.0+
Date: Wed, 05 Mar 2008 13:40:19 +0100

 Hello,
 
 the submitted ushare patch seems to be OK.
 Because of this i give it a GO.
 
 Regards
 Volker
 
 -------- Original-Nachricht --------
 > Datum: Wed, 5 Mar 2008 05:09:02 UT
 > Von: Edwin Groothuis <edwin@FreeBSD.org>
 > An: votdev@gmx.de
 > Betreff: Re: ports/121378: net/ushare should link to pthread in FreeBSD 7.0+
 
 > Maintainer of net/ushare,
 > 
 > Please note that PR ports/121378 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/121378
 > 
 > -- 
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 
 -- 
 GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen!
 Jetzt dabei sein: http://www.shortview.de/?mc=sv_ext_mf@gmx
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Wed Mar 5 16:38:52 UTC 2008 
State-Changed-Why:  
Maintainer approved. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121378 
State-Changed-From-To: open->closed 
State-Changed-By: rafan 
State-Changed-When: Sat Mar 8 18:36:02 UTC 2008 
State-Changed-Why:  
Committed. Thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/121378: commit references a PR
Date: Sat,  8 Mar 2008 18:36:00 +0000 (UTC)

 rafan       2008-03-08 18:35:55 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/ushare           Makefile 
   Log:
   - Link to pthread for all OS versions to fix listening socket with -D
   
   PR:             ports/121378
   Submitted by:   Josh Carroll <josh.carroll at gmail.com>
   Approved by:    Volker Theile" <votdev at gmx.de> (maintainer)
   
   Revision  Changes    Path
   1.11      +1 -3      ports/net/ushare/Makefile
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
