Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 3 Nov 2001 21:25:00 -0700 (MST)
From:      FreeBSD user <freebsd@XtremeDev.com>
To:        Mark Miller <joup@bigfoot.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: solving pthread problems permanently?
Message-ID:  <20011103212219.E27717-100000@Amber.XtremeDev.com>
In-Reply-To: <20011103155245.Q37701-100000@soda.csua.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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