Subject: Re: ThreadedX patch, take 2
To: FUKAUMI Naoki <naoki@fukaumi.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-userlevel
Date: 01/26/2003 18:27:03
On Mon, Jan 27, 2003 at 10:45:09AM +0900, FUKAUMI Naoki wrote:
> Grr!
>
> % ldd /usr/X11R6/lib/libGL.so.1.2
> /usr/X11R6/lib/libGL.so.1.2:
> -lpthread.0 => /usr/lib/libpthread.so.0
>
> % grep -r xthread_ xfree/xc/lib/GL
> GL/glx/glxext.c:static xthread_key_t ContextTSD;
> GL/glx/glxext.c: xthread_key_create(&ContextTSD, NULL);
> GL/glx/glxext.c: xthread_get_specific(ContextTSD, &p);
> GL/glx/glxext.c: xthread_key_create(&ContextTSD, NULL);
> GL/glx/glxext.c: xthread_set_specific(ContextTSD, c);
>
> % head xfree/xc/lib/GL/Imakefile
> XCOMM $XFree86: xc/lib/GL/Imakefile,v 1.37 2001/03/23 20:56:28 dawes Exp $
>
> #include <Threads.tmpl>
> :
>
> hmm.
>
> I don't know that Threads.tmpl is needed or not needed in GL/Imakefile.
> But I think -lpthread is not needed for libGL...
On NetBSD, it certainly is not required, since NetBSD's "threadlib"
support includes a simple TSD implementation which is sufficient
for libGL's use.
I think this is actually a bug in XFree86, and it should be brought
up with them.
> This was introduced my change
>
> > I enabled `# define ThreadsLibraries -lpthread' line again, ...
>
> This change was for programs/ico compile problem.
Yes, I believe your change was correct ... I think this is a libGL problem.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>