From owner-freebsd-current Wed Oct 30 14:31: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 7DD7137B404 for ; Wed, 30 Oct 2002 14:31:21 -0800 (PST) Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E26543E88 for ; Wed, 30 Oct 2002 14:31:20 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from mailgate.nlsystems.com ([62.49.251.130] helo=herring.nlsystems.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 1871Mt-0006YM-0V; Wed, 30 Oct 2002 22:31:19 +0000 Received: from herring (herring [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.4) with ESMTP id g9UMVIj0030751; Wed, 30 Oct 2002 22:31:18 GMT (envelope-from dfr@nlsystems.com) Date: Wed, 30 Oct 2002 22:31:18 +0000 (GMT) From: Doug Rabson To: Terry Lambert Cc: Daniel Eischen , Subject: Re: [PATCH: libc]Re: gnome on current In-Reply-To: <20021030220614.R22480-100000@herring.nlsystems.com> Message-ID: <20021030223028.Q22480-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 Wed, 30 Oct 2002, Doug Rabson wrote: > On Wed, 30 Oct 2002, Terry Lambert wrote: > > > Doug Rabson wrote: > > > On Wed, 30 Oct 2002, Terry Lambert wrote: > > > > Daniel Eischen wrote: > > > > > Patch looks correct. > > > > > > > > Please commit? 8-). > > > > > > Well I made a libc with this patch and rebuilt XFree86-4-libraries without > > > libXThrStub but I ran into problems compiling the clients. The clients > > > *require* someone in the link to supply the pthread_* symbols and libc.so > > > only had _pthread_* symbols. I added some more weak references to libc.so > > > but that just gets us back to square one. > > > > > > The problem is that the sawfish configuration tools are written using some > > > extensible lisp/scheme thing called rep. The main rep binary links against > > > libc.so so that occurs early in the list. Later on stacks of libraries are > > > loaded dynamically, some of which depend on libc_r.so. Unfortunately > > > libc_r.so is far too late in the list to get a lookin and it dies in > > > exactly the same way as before, for the same reason (calling a > > > non-functional stub version of pthread_setspecific(). > > > > You need to link the library against libc_r.so instead of libXThrStub.so. > > Probably not. Doing that breaks the existing 'feature' of being able to > use X11 in entirely non-threaded programs. I'm not sure whether that is > acceptable. It also stops programs from being able to select between > several thread implementations, of which -current has two. > > I think the only sensible solution to this problem is for libraries which > provide an actual pthreads implementation (rather than a set of stubs) to > define strong symbols. Wierd debugging wrappers can still be achieved via > some dlopen/dlsym hackery. For what its worth, doing this (defining strong pthread_* symbols in libc_r) makes everything work fine, with or without libXThrStub. -- 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