From owner-freebsd-current Tue Oct 29 5:58:32 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 07BB237B401 for ; Tue, 29 Oct 2002 05:58:31 -0800 (PST) Received: from anchor-post-39.mail.demon.net (anchor-post-39.mail.demon.net [194.217.242.80]) by mx1.FreeBSD.org (Postfix) with ESMTP id 716C643E3B for ; Tue, 29 Oct 2002 05:58:30 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from mailgate.nlsystems.com ([62.49.251.130] helo=herring.nlsystems.com) by anchor-post-39.mail.demon.net with esmtp (Exim 3.36 #2) id 186Wt3-0001B7-0U; Tue, 29 Oct 2002 13:58:29 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.4) with ESMTP id g9TDwRgu000243; Tue, 29 Oct 2002 13:58:27 GMT (envelope-from dfr@nlsystems.com) Date: Tue, 29 Oct 2002 13:58:27 +0000 (GMT) From: Doug Rabson To: John Polstra Cc: current@freebsd.org Subject: Re: gnome on current In-Reply-To: <200210291346.g9TDk6tp049754@vashon.polstra.com> Message-ID: <20021029135722.L97929-100000@herring.nlsystems.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Tue, 29 Oct 2002, John Polstra wrote: > 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. This is a big problem then since X11.so links to XThrStub.so. This means that XThrStub will be ahead of libc_r in many situations. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message