threads/121343: pthread_cond_wait hanging in libthr

Josh Carroll josh.carroll at
Wed Mar 5 03:50:03 UTC 2008

The following reply was made to PR threads/121343; it has been noted by GNATS.

From: "Josh Carroll" <josh.carroll at>
To: "David Xu" <davidxu at>
Cc: freebsd-gnats-submit at
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
 >  -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
 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.

More information about the freebsd-threads mailing list