Gerald Pfeifer pfeifer@dbai.tuwien.ac.at writes:
How should this be solved (in a portable way)?
Adding -lc seems the right way. In fact I committed that fix last night ;-)
Yes I noticed. :-)
However, it doesn't seem to be the 100% correct fix. DLLs using pthreads like the ones depending on OpenGL needs to link with -lc_r instead of -lc on FreeBSD.
---8<---
gcc -shared -Wl,-Bsymbolic,-z,defs d3d8.spec.o basetexture.o cubetexture.o d3d8_main.o device.o directx.o indexbuffer.o resource.o surface.o swapchain.o texture.o vertexbuffer.o volume.o volumetexture.o d3d8.dll.dbg.o -o d3d8.dll.so -L../../dlls -L../../library -lwine -L../../ole -lwine_uuid -L/usr/X11R6/lib -lSM -lICE -lXxf86dga -lXxf86vm -lXv -lXext -lX11 -lGL -lGLU -lm -lc /usr/lib/libgcc.a(_eh.o): In function `__empty': _eh.o(.text+0x9e): undefined reference to `pthread_setspecific' /usr/lib/libgcc.a(_eh.o): In function `__get_eh_info': _eh.o(.text+0xec): undefined reference to `pthread_key_create' _eh.o(.text+0x1b9): undefined reference to `pthread_getspecific' _eh.o(.text+0x1d8): undefined reference to `pthread_setspecific' /usr/lib/libgcc.a(frame.o)(.text+0x44b): undefined reference to `pthread_mutex_lock' /usr/lib/libgcc.a(frame.o)(.text+0x492): undefined reference to `pthread_mutex_unlock' /usr/lib/libgcc.a(frame.o): In function `__register_frame_info': frame.o(.text+0x8d9): undefined reference to `pthread_mutex_lock' frame.o(.text+0x900): undefined reference to `pthread_mutex_unlock' /usr/lib/libgcc.a(frame.o): In function `__register_frame_info_table': frame.o(.text+0x969): undefined reference to `pthread_mutex_lock' frame.o(.text+0x990): undefined reference to `pthread_mutex_unlock' /usr/lib/libgcc.a(frame.o): In function `__deregister_frame_info': frame.o(.text+0x9dc): undefined reference to `pthread_mutex_lock' frame.o(.text+0xa27): undefined reference to `pthread_mutex_unlock' frame.o(.text+0xa4d): undefined reference to `pthread_mutex_unlock' *** Error code 1
On Thu, 21 Nov 2002, Alexandre Julliard wrote:
Adding -lc seems the right way. In fact I committed that fix last night ;-)
Thanks a lot! :-)
On Thu, 21 Nov 2002, Patrik Stridvall wrote:
However, it doesn't seem to be the 100% correct fix. DLLs using pthreads like the ones depending on OpenGL needs to link with -lc_r instead of -lc on FreeBSD.
Bummer. Would it work to *always* use -lc_r on FreeBSD, Patrik/Alfred?
Gerald
Gerald Pfeifer pfeifer@dbai.tuwien.ac.at writes:
Bummer. Would it work to *always* use -lc_r on FreeBSD, Patrik/Alfred?
AFAICS libc_r is a user-space thread implementation, it won't do the right thing for us. I guess we'll need some kind of pthread emulation like we have on Linux.