Subject: Re: ThreadedX patch, take 2
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: FUKAUMI Naoki <naoki@fukaumi.org>
List: tech-userlevel
Date: 01/24/2003 23:37:15
--Multipart_Fri_Jan_24_23:37:15_2003-1
Content-Type: text/plain; charset=US-ASCII
Hi
At Mon, 20 Jan 2003 00:52:05 -0800,
Jason R Thorpe wrote:
> Ah, I see I made a mistake in the Xthreads.h part of the patch. I'll
> correct it and post again.
thr_key_{create,delete} -> thr_key{create,delete}?
^
(or, are you planning to change stub name in libc?)
> > 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'
> > *** Error code 1 (continuing)
>
> ...though, I am a bit puzzled as to what is creating the direct pthread
> references in this case...
I enabled `# define ThreadsLibraries -lpthread' line again, then xsrc
build was completed without any problem.
% grep pthread XSRCBUILDLOG
gcc -o makekeys -O2 -ansi -Dasm=__asm -I../.. -I../../exports/include -DCSRG_BASED -DFUNCPROTO=15 -DNARROWPROTO -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI -DUSE_NBSD_THREADLIB -DHAS_SNPRINTF -DLIBX11 util/makekeys.c -L/usr/X11R6/lib -lpthread -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
+ gcc -o ./libGL.so.1.2~ -shared -Wl,-rpath,/usr/X11R6/lib -Wl,-soname,libGL.so.1 ../../../lib/GL/glx/clientattrib.o ../../../lib/GL/glx/compsize.o ../../../lib/GL/glx/dispatch.o ../../../lib/GL/glx/eval.o ../../../lib/GL/glx/g_render.o ../../../lib/GL/glx/g_single.o ../../../lib/GL/glx/g_vendpriv.o ../../../lib/GL/glx/glapi.o ../../../lib/GL/glx/glapinoop.o ../../../lib/GL/glx/glthread.o ../../../lib/GL/glx/glxcmds.o ../../../lib/GL/glx/glxext.o ../../../lib/GL/glx/indirect_init.o ../../../lib/GL/glx/pixel.o ../../../lib/GL/glx/pixelstore.o ../../../lib/GL/glx/render2.o ../../../lib/GL/glx/renderpix.o ../../../lib/GL/glx/single2.o ../../../lib/GL/glx/singlepix.o ../../../lib/GL/glx/vertarr.o ../../../lib/GL/glx/xfont.o -lpthread
gcc -o ico -O2 -ansi -Dasm=__asm -L../../exports/lib ico.o -lXext -lX11 -L/usr/X11R6/lib -lpthread -lm -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
gcc -o glxinfo -O2 -ansi -Dasm=__asm -L../../exports/lib glxinfo.o -lGLU -lGL -lXext -lX11 -L/usr/X11R6/lib -lpthread -lm -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
gcc -o glxgears -O2 -ansi -Dasm=__asm -L../../exports/lib glxgears.o -lGL -lXext -lX11 -L/usr/X11R6/lib -lpthread -lm -Wl,-rpath,/usr/X11R6/lib -Wl,-rpath-link,../../exports/lib
It seems that only these programs are linked to libpthread...
Is this correct?
--
FUKAUMI Naoki
--Multipart_Fri_Jan_24_23:37:15_2003-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="xthreads-patch2"
Content-Transfer-Encoding: base64
SW5kZXg6IHhmcmVlL3hjL2NvbmZpZy9jZi9OZXRCU0QuY2YKPT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpSQ1MgZmlsZTog
L2N2c3Jvb3QveHNyYy94ZnJlZS94Yy9jb25maWcvY2YvTmV0QlNELmNmLHYKcmV0cmlldmluZyBy
ZXZpc2lvbiAxLjM4CmRpZmYgLXUgLXIxLjM4IE5ldEJTRC5jZgotLS0geGZyZWUveGMvY29uZmln
L2NmL05ldEJTRC5jZgkyMDAzLzAxLzE5IDE0OjM3OjE5CTEuMzgKKysrIHhmc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