From owner-freebsd-questions Sun Feb 18 2:17: 8 2001 Delivered-To: freebsd-questions@freebsd.org Received: from glitnir.cfar.umd.edu (glitnir.cfar.umd.edu [128.8.132.40]) by hub.freebsd.org (Postfix) with ESMTP id 01D8337B503; Sun, 18 Feb 2001 02:17:03 -0800 (PST) Received: from glitnir.cfar.umd.edu (localhost [127.0.0.1]) by glitnir.cfar.umd.edu (8.9.3/8.9.1) with ESMTP id FAA08244; Sun, 18 Feb 2001 05:16:52 -0500 (EST) Message-Id: <200102181016.FAA08244@glitnir.cfar.umd.edu> To: Uri.Shenderovich@lightscapenet.com Cc: freebsd-questions@FreeBSD.ORG, freebsd-newbies@FreeBSD.ORG Subject: Re: Supporting threads by gcc-2.95.2 In-reply-to: Your message of "Sun, 18 Feb 2001 08:48:13 +0200." Date: Sun, 18 Feb 2001 05:16:52 -0500 From: Andrew Arensburger Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 18 Feb 2001 08:48:13 +0200, Uri.Shenderovich@lightscapenet.com wrote: > Hi , > I've recently installed FreeBSD(4.1) and was trying to compile something > that requires > posix threads supported.The 'configure' discovered that gcc doesn't support > threads. > Is it true and I have to get sources and recompile the gcc ? > Or maybe I just , forgot to install something :( ? I believe that under Linux, to compile with threads, you link with the 'pthreads' library, i.e., you compile with "gcc -lpthread". Under FreeBSD, however, you compile with "gcc -pthread". Presumably the 'configure' script is broken. A quick and dirty hack is to edit 'configure' and replace all instances of "-lpthread" with "-pthread". -- Andrew Arensburger, Systems guy Center for Automation Research arensb@cfar.umd.edu University of Maryland How many programmers does it take to debug an AI? One, but the program has to really, really want to change. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message