Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2008 04:01:44 GMT
From:      Josh Carroll <josh.carroll@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/121378: ushare should link to pthread in FreeBSD 7.0+
Message-ID:  <200803050401.m2541iCx055807@www.freebsd.org>
Resent-Message-ID: <200803050410.m254A1it024513@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121378
>Category:       ports
>Synopsis:       ushare should link to pthread in FreeBSD 7.0+
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 05 04:10:00 UTC 2008
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803050401.m2541iCx055807>