Date: Fri, 8 Nov 2002 15:14:09 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: questions@FreeBSD.ORG Subject: Re: socks5 server compile error Message-ID: <20021108151409.GA66724@happy-idiot-talk.infracaninophi> In-Reply-To: <20021108135737.16052.qmail@mail-relay.edison.ro> References: <20021108135737.16052.qmail@mail-relay.edison.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 08, 2002 at 01:57:37PM -0000, gicabulica@edison.ro wrote:
> I\'ve just received the socks5 server from nec and I tried to compile it
> with threads.
> The standard procedure works like a charm but when I add the --threaded
> options it fails at compilation level.
>
> I get a lot of error about like pthreads_XXXX:
> However, I can read the man pages of this functions and I know that
> FreeBSD has suport for POSIX threads (pthreads).
>
> Anyway, I found out that the standard configure file does not find
> the right where the libraries are:
That's because there is no separate libpthreads.so under FreeBSD.
Instead you use the -pthread compiler flag, which causes (inter alia)
the linker to use the reentrant version of the system library,
libc_r.so. (libc_r.so contains all the pthread_foo() functions,
unlike the standard libc.so).
Now, compiling generic programs using pthreads under FreeBSD 4.x tends
to get in a bit of a tangle unless the authors or port maintainers
have seen fit to provide FreeBSD support specifically (usually a claim
of "thread support" means "thread support on Linux"). Avoid threaded
versions of software that aren't documented as usable under FreeBSD
unless you like knotty problems.
Cheers,
Matthew
--
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
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?20021108151409.GA66724>
