From owner-freebsd-current Tue Oct 29 5:46:23 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18D4537B401 for ; Tue, 29 Oct 2002 05:46:22 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E85443E91 for ; Tue, 29 Oct 2002 05:46:21 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g9TDk6x24507; Tue, 29 Oct 2002 05:46:06 -0800 (PST) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.5/8.12.5/Submit) id g9TDk6tp049754; Tue, 29 Oct 2002 05:46:06 -0800 (PST) (envelope-from jdp) Date: Tue, 29 Oct 2002 05:46:06 -0800 (PST) Message-Id: <200210291346.g9TDk6tp049754@vashon.polstra.com> To: current@freebsd.org From: John Polstra Cc: dfr@nlsystems.com Subject: Re: gnome on current In-Reply-To: <20021029121706.L97929-100000@herring.nlsystems.com> References: <20021029121706.L97929-100000@herring.nlsystems.com> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20021029121706.L97929-100000@herring.nlsystems.com>, Doug Rabson wrote: > I just spent a few hours trying to get gnome working on one of my systems, > since kde still appears to be completely hosed. Unfortunately, not much of > it worked reliably. In particular, all the sawfish preferences applets > crash instantly. > > On investigating one of the crashes more carefully, I discovered that all > calls to pthread_*() were being resolved to stubs in libXThrStub.so in > spite of the fact that libc_r was also loaded. This caused problems for > e.g. flockfile which failed to initialise its mutex (uthread_mutex.c's > init_static calls pthread_mutex_init instead of _pthread_mutex_init and > ends up in libXThrStub). After working around that, I had more fun where > one of the gnome libs tried to call pthread_getspecific(). > > Why isn't the linker resolving these symbols against the ones in libc_r? > For some reason, libc_r defines them weakly so they get resolved by the > first weak definition in the list of libs, which in this case is > libXThrStub :-( When a symbol is defined in multiple libraries, the first library wins. That's how it has always been in Unix, for archive libraries and for shared libraries. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message