From owner-freebsd-arch@FreeBSD.ORG Tue Sep 4 13:21:20 2007 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEA5616A41A for ; Tue, 4 Sep 2007 13:21:20 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.freebsd.org (Postfix) with ESMTP id 4042713C478 for ; Tue, 4 Sep 2007 13:21:18 +0000 (UTC) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.4/8.13.4) with ESMTP id l84DLH15090271 for ; Tue, 4 Sep 2007 17:21:17 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.4/8.13.4/Submit) id l84DLGFe090266 for arch@freebsd.org; Tue, 4 Sep 2007 17:21:17 +0400 (MSD) (envelope-from yar) Date: Tue, 4 Sep 2007 17:21:16 +0400 From: Yar Tikhiy To: arch@freebsd.org Message-ID: <20070904132116.GS30502@comp.chem.msu.su> References: <20070824.172212.74696955.imp@bsdimp.com> <20070824.213615.146406398.imp@bsdimp.com> <20070828005654.GA50401@dragon.NUXI.org> <20070828014748.GV21352@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070828014748.GV21352@comp.chem.msu.su> User-Agent: Mutt/1.5.9i Cc: Subject: Re: ABI and install tools (was Re: cvs commit: src/lib/libc/gen fts-compat.c fts-compat.h) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2007 13:21:20 -0000 On Tue, Aug 28, 2007 at 05:47:49AM +0400, Yar Tikhiy wrote: > [Redirecting this branch to -arch] > > On Mon, Aug 27, 2007 at 05:56:54PM -0700, David O'Brien wrote: > > On Fri, Aug 24, 2007 at 09:36:15PM -0600, M. Warner Losh wrote: > > > In message: > > > Daniel Eischen writes: > > > : I guess the build system should be more tolerant of this, but > > > : there are bound to be problems regardless. I don't see why > > > : the install tools can't also either have their own set of > > > : libraries (utilizing LD_LIBRARY_PATH) or be built static. > > > > > > There's much resistance to building everything that the build system > > > might be used being build static. It adds too much time and > > > complexity to the build system, the opponents say. > > > > I've never heard an argument against building these bits static. > > What's the issue? > > FWIW, here's a patch implementing the opposite approach: If we're > going to install world over this system (installworld with DESTDIR > unset or empty), first install the new versions of necessary tools > to a scratch directory and then switch to the new tools. The kernel > must be capable of running the new tools with the new libraries, > which is an already existing requirement. > > With the patch, the build system can tolerate ABI breakage in libc > and, according to audit(4), it runs no binaries from the old system > in the sensitive part of installworld. > > For easier and safer testing, INSTALL_TESTING can be set so that > the new way is chosen even if DESTDIR is set. Of course, make sure > that the new tools are for the same platform as the machine runs. > Usually you cannot select a different platform w/o setting DESTDIR. > > Comments are welcome. Thanks! For the record: Ruslan Ermilov has objected privately to the proposed approach with quite reasonable arguments, the most important one being that using new binaries if DESTDIR is unset would mean using different tool sets for different install types, which will make debugging other people's installworld problems harder. Therefore we've started to work on the opposite approach, i.e., saving old libs along with old tools for installworld to use. It has proved rather elegant and not depending on any ifs, unlike the former approach. And, with an extra bit of magic around ld.so, it allows for installing world built for a different arch, e.g., amd64 over i386, which is fun. :-) The current state of the task can be seen there: http://perforce.freebsd.org/fileLogView.cgi?FSPC=//depot/user/yar/hack/Makefile.inc1 -- Yar