Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jan 1999 09:11:51 -0600
From:      "Richard Seaman, Jr." <dick@tar.com>
To:        Jeremy Lea <reg@shale.csir.co.za>
Cc:        freebsd-current@FreeBSD.ORG, brian@litzinger.org
Subject:   Re: linuxthreads, gimp 1.1+, dies
Message-ID:  <19990119091151.F600@tar.com>
In-Reply-To: <19990119140613.B826@shale.csir.co.za>; from Jeremy Lea on Tue, Jan 19, 1999 at 02:06:13PM %2B0200
References:  <19990118182717.A15566@top.worldcontrol.com> <Pine.BSF.4.05.9901182203500.11971-100000@janus.syracuse.net> <19990119024539.A88383@top.worldcontrol.com> <19990119140613.B826@shale.csir.co.za>

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



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