Subject: Re: ThreadedX patch, take 2
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: tech-userlevel
Date: 01/27/2003 11:08:30
I'm sorry.
At Mon, 27 Jan 2003 10:45:09 +0900,
FUKAUMI Naoki wrote:
> % 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);
:
> I don't know that Threads.tmpl is needed or not needed in GL/Imakefile.
They are using xthread_foobar, so they need Threads.tmpl. (correct?)
> But I think -lpthread is not needed for libGL...
Libpthread should be linked by each X && threading applications. (correct?)
> This was introduced my change
>
> > I enabled `# define ThreadsLibraries -lpthread' line again, ...
>
> This change was for programs/ico compile problem.
>
> libGL, glxgears, glxinfo didn't require -lpthread with your first patch.
It seems my patch was wrong ;)
It should remove `ThreadsLibraries -lpthread' line again, then fix ico
compile error...
gcc -o ico -O2 -ansi -Dasm=__asm -L../../exports/lib ico.o -lXext -lX11 -L/usr/X11R6/lib -lm -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
ico.o: In function `do_ico_window':
ico.o(.text+0x18d6): undefined reference to `pthread_mutex_lock'
ico.o(.text+0x18f5): undefined reference to `pthread_cond_broadcast'
ico.o(.text+0x1905): undefined reference to `pthread_mutex_unlock'
ico.o: In function `main':
ico.o(.text+0x2064): undefined reference to `pthread_cond_init'
ico.o(.text+0x209d): undefined reference to `pthread_create'
ico.o(.text+0x20b3): undefined reference to `pthread_mutex_lock'
ico.o(.text+0x20c5): undefined reference to `pthread_cond_wait'
ico.o(.text+0x20d5): undefined reference to `pthread_mutex_unlock'
Am I correct? ;)
--
FUKAUMI Naoki