From owner-freebsd-questions Sat Nov 3 20:25: 5 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.XtremeDev.com (xtremedev.com [216.241.38.65]) by hub.freebsd.org (Postfix) with ESMTP id 3E94D37B406 for ; Sat, 3 Nov 2001 20:25:03 -0800 (PST) Received: from xtremedev.com (xtremedev.com [216.241.38.65]) by mail.XtremeDev.com (Postfix) with ESMTP id 7871270607; Sat, 3 Nov 2001 21:25:00 -0700 (MST) Date: Sat, 3 Nov 2001 21:25:00 -0700 (MST) From: FreeBSD user To: Mark Miller Cc: freebsd-questions@freebsd.org Subject: Re: solving pthread problems permanently? In-Reply-To: <20011103155245.Q37701-100000@soda.csua.berkeley.edu> Message-ID: <20011103212219.E27717-100000@Amber.XtremeDev.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG FreeBSD comes with pthreads. All the ports I know know that require pthreads knows this and automatically links it in. You don't need linux-threads. And the flag you want is -pthread. If you're getting `pthread_getspecific` errors, then chances are either the port didn't use -pthread, or you have /usr/ports/devel/pth installed. Uninstall it if you have it installed. On Sat, 3 Nov 2001, Mark Miller wrote: > > I'm trying to figure out a way to add either -lc_r or -llthreads to the > linking process of any port build that requires pthreads (to avoid the > "undefined reference to `pthread_getspecific'" errors). Can someone tell > me where I might put this? I was thinking about some file in > /usr/ports/Mk/, but I don't really know much about the build process. > > Or another question-- if I just add these libraries to *every* build, will > that be somehow detrimental to random binaries? I don't mind having my > compiles being a little slower, but I don't want the addition of libraries > to slow down the running of my applications. Also, if this is possible, > how do I do it? > > And finally-- which library (c_r or linuxthreads) is preferable? I have > both installed. > > Thanks, > Mark Miller > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message