From owner-freebsd-current Tue Jan 19 07:14:25 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id HAA14265 for freebsd-current-outgoing; Tue, 19 Jan 1999 07:14:25 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from ns.tar.com (ns.tar.com [204.95.187.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id HAA14210 for ; Tue, 19 Jan 1999 07:14:11 -0800 (PST) (envelope-from dick@ns.tar.com) Received: (from dick@localhost) by ns.tar.com (8.9.2/8.9.1) id JAA05428; Tue, 19 Jan 1999 09:11:51 -0600 (CST) (envelope-from dick) Date: Tue, 19 Jan 1999 09:11:51 -0600 From: "Richard Seaman, Jr." To: Jeremy Lea Cc: freebsd-current@FreeBSD.ORG, brian@litzinger.org Subject: Re: linuxthreads, gimp 1.1+, dies Message-ID: <19990119091151.F600@tar.com> References: <19990118182717.A15566@top.worldcontrol.com> <19990119024539.A88383@top.worldcontrol.com> <19990119140613.B826@shale.csir.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <19990119140613.B826@shale.csir.co.za>; from Jeremy Lea on Tue, Jan 19, 1999 at 02:06:13PM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Jan 19, 1999 at 02:06:13PM +0200, Jeremy Lea wrote: > On Tue, Jan 19, 1999 at 02:45:39AM -0800, brian@worldcontrol.com wrote: > > Gimp (CVS) compiled with > > CFLAGS="-g -D_THREAD_SAFE -I/usr/local/include -L/usr/local/lib -O2 -m486 > > -pipe -lpthread" > > Hmm, if you're using the libpthread from lt.tar.com, and you installed it > according to the instructions, then that should read: > > > CFLAGS="-g -D_THREAD_SAFE -DLINUXTHREADS -I/usr/local/include > > --L/usr/local/lib -O2 -m486 pipe -lpthread" > > So it picks up the correct header. But I doubt you would have got it > compiled without that? Actually, the new version, in FreeBSD "ports" form, doesn't require -DLINUXTHREADS anymore, but it does require -I/usr/local/include to pick up the right header, since it installs a pthread.h into /usr/local/include. This conflicts with the pthread.h in /usr/include. > Also, are you using glib11-devel/gtk11-devel ports > linked against libpthread? By default the ports link against libc_r. Right. > Also, the linuxthreads stuff needs libc to be reentrant, from what I > understand, and Richard hasn't released (or finished) those patches yet. libc is partly re-entrant, partly not. It depends on what calls you're making. As a rule of thumb, wherever the pthread spec calls for a "_r" function (eg. readdir_r), the underlying function is not thread safe, and either the "_r" function is missing or is not threadsafe itself (eg. localtime_r exists in libc -- recent versions -- but is not thread safe). strrok_r is an exception, I think. -- Richard Seamman, Jr. email: dick@tar.com 5182 N. Maple Lane phone: 414-367-5450 Chenequa WI 53058 fax: 414-367-5852 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message