threads/121343: pthread_cond_wait hanging in libthr
Josh Carroll
josh.carroll at gmail.com
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 gmail.com>
To: "David Xu" <davidxu at freebsd.org>
Cc: freebsd-gnats-submit at 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
More information about the freebsd-threads
mailing list