From owner-freebsd-questions Fri Nov 8 7:14:25 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F47437B401 for ; Fri, 8 Nov 2002 07:14:24 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F97143E7B for ; Fri, 8 Nov 2002 07:14:23 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) by smtp.infracaninophile.co.uk (8.12.6/8.12.6) with ESMTP id gA8FEFtf066999 for ; Fri, 8 Nov 2002 15:14:15 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost) by happy-idiot-talk.infracaninophile.co.uk (8.12.6/8.12.6/Submit) id gA8FE9cw066998 for questions@FreeBSD.ORG; Fri, 8 Nov 2002 15:14:09 GMT Date: Fri, 8 Nov 2002 15:14:09 +0000 From: Matthew Seaman To: questions@FreeBSD.ORG Subject: Re: socks5 server compile error Message-ID: <20021108151409.GA66724@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@FreeBSD.ORG References: <20021108135737.16052.qmail@mail-relay.edison.ro> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021108135737.16052.qmail@mail-relay.edison.ro> User-Agent: Mutt/1.5.1i X-Spam-Status: No, hits=-3.3 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_01_02, USER_AGENT,USER_AGENT_MUTT version=2.43 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 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