On Mon, Nov 21, 2011 at 12:51:22PM +0100, Antoine Jacoutot wrote: > On Mon, Nov 21, 2011 at 03:31:12AM -0800, Justin Lindberg wrote: > > OpenBSD 5.0 amd64 -- probably all arches > > Still not fixed in current. > > > > I tried to run R, and libgthread-2.0 segfaulted > > because apparently it was not linked with pthread. > > > > I confirmed this, because relinking the shared > > library with pthread makes it work. > > > > The switch -lpthread is necessary for the linker. > > There was a big hullabaloo about this a couple of > > years ago on the mailing list. > > > > Could somebody please patch glib2's Makefile and > > the pthreads(3) man page? > > No this is not how it works. > You need to link the binary itself that uses pthreads with -pthreads (see > pthreads(3)).
sorry, s/-pthreads/-pthread of course -- Antoine