From owner-freebsd-threads@FreeBSD.ORG Wed Mar 5 03:50:03 2008 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95F7C1065671 for ; Wed, 5 Mar 2008 03:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 7CF0A8FC16 for ; Wed, 5 Mar 2008 03:50:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m253o30c023953 for ; Wed, 5 Mar 2008 03:50:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m253o3I8023952; Wed, 5 Mar 2008 03:50:03 GMT (envelope-from gnats) Date: Wed, 5 Mar 2008 03:50:03 GMT Message-Id: <200803050350.m253o3I8023952@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: "Josh Carroll" Cc: Subject: Re: threads/121343: pthread_cond_wait hanging in libthr X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Josh Carroll List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 03:50:03 -0000 The following reply was made to PR threads/121343; it has been noted by GNATS. From: "Josh Carroll" To: "David Xu" Cc: freebsd-gnats-submit@freebsd.org Subject: Re: threads/121343: pthread_cond_wait hanging in libthr Date: Tue, 4 Mar 2008 22:42:02 -0500 > I added -lpthread to link command (I found you don't have it), > and this is why it works on my machine, you might try it. > > cc -I/usr/local/include -O2 -fno-strict-aliasing -pipe -Wall -W > -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT > -L/usr/local/lib -o ushare cds.o > cms.o msr.o http.o presentation.o metadata.o mime.o services.o > buffer.o util_iconv.o content.o cfgparser.o trace.o redblack.o osdep.o > ushare.o -lupnp - > lthreadutil -lixml -lpthread > Thank you, yes if I rebuild ushare and add -lpthread, it works properly then. It appears as though the ushare port's Makefile is explicitly not adding -lpthread for 7.0: .if ${OSVERSION} < 700042 CFLAGS+= ${PTHREAD_LIBS} .endif I don't know the reasoning behind that, but I'll submit a PR to the ushare maintainer to have this fixed. Thank you very much for your time! I appreciate your help. Regards, Josh