From owner-freebsd-emulation@FreeBSD.ORG Tue Oct 18 19:26:16 2005 Return-Path: X-Original-To: freebsd-emulation@freebsd.org Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 932A316A41F for ; Tue, 18 Oct 2005 19:26:16 +0000 (GMT) (envelope-from dan@langille.org) Received: from m21.unixathome.org (m21.unixathome.org [205.150.199.217]) by mx1.FreeBSD.org (Postfix) with ESMTP id B4A7743D48 for ; Tue, 18 Oct 2005 19:26:15 +0000 (GMT) (envelope-from dan@langille.org) Received: from localhost (localhost [205.150.199.217]) by m21.unixathome.org (Postfix) with ESMTP id F2FE4C375; Tue, 18 Oct 2005 15:26:14 -0400 (EDT) Received: from m21.unixathome.org ([205.150.199.217]) by localhost (m21.unixathome.org [205.150.199.217]) (amavisd-new, port 10024) with ESMTP id 22338-06; Tue, 18 Oct 2005 15:26:11 -0400 (EDT) Received: from bast.unixathome.org (bast.unixathome.org [70.26.229.230]) by m21.unixathome.org (Postfix) with ESMTP id 80193BFB0; Tue, 18 Oct 2005 15:26:11 -0400 (EDT) Received: from wocker (wocker.unixathome.org [10.55.0.99]) by bast.unixathome.org (Postfix) with ESMTP id 2E9C43D3B; Tue, 18 Oct 2005 15:26:10 -0400 (EDT) From: "Dan Langille" To: Doug Ambrisko Date: Tue, 18 Oct 2005 15:26:10 -0400 MIME-Version: 1.0 Message-ID: <43551412.30002.9AA194B1@localhost> Priority: normal In-reply-to: <200510181847.j9IIlNNf058983@ambrisko.com> References: <43550620.1687.9A6B18FF@localhost> X-mailer: Pegasus Mail for Windows (4.21c) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Content-description: Mail message body X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at unixathome.org Cc: freebsd-emulation@freebsd.org Subject: Re: cross platform building under emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Oct 2005 19:26:16 -0000 On 18 Oct 2005 at 11:47, Doug Ambrisko wrote: > Dan Langille writes: > | On 18 Oct 2005 at 11:22, Doug Ambrisko wrote: > | > Kris Kennaway writes: > | > | On Fri, Oct 14, 2005 at 07:27:00PM -0700, Doug Ambrisko wrote: > | > | > Dan Langille writes: > | > | > | Daris has got me thinking about unpacking 4.9-release/bin into a > | > | > | directory, and then doing a chroot. > | > | > > | > | > That sort-of works. I've done some setups for companies and get > | > | > iteratively better solutions. > | > | Can you elaborate please upon the "sort-of-works". I haven't seen > | anything that indicates this. Thanks. > > I think you are pretty safe doing a "make world". When you start > building things that use autoconf, libtool etc. that probe the OS > then things start to fail. Sometimes it works by accident. > pkg_add for example will add versions based on the kernel via libc. > Building Postgress will fail. You'll also notice that building > some things will say "freebsd6" in the "configuration instead of > the real target since it picks up the "uname" via the kernel using > libc's uname and not /bin/uname. > > If you need things like mount, ps etc in your build script they won't > work so you need some helper binaries and it needs to pull in the > correct libexec & libs which gets tricky if your host is amd64 and > your are building for i386 since you get name space conflicts. > I used a sed script to "binary" edit the host's binaries to use > a different directory. As long as you don't change the length of > strings your okay. Here's an example: > sed -e 's/libkvm/libhvm/g' -e 's/libexec/libhxec/g' \ > -e 's/libsbuf/libhbuf/g' > > So it depends on how clean of a solution you want. With the things > I've done I can do a complete build of FreeBSD and ports with it > thinking it whatever version the target is. > > Somethings are close enough they work by accident. I mainly ran > into trouble building Postgress for FreeBSD 4.10 on a FreeBSD amd64 host. > I need this since I want one build machine to be able to build all of > our SW releases using whatever version of FreeBSD it was shipped with. > Also I could speed up builds by using a 4G MFS for the build directory > using amd64! I have two goals: faster builds, and consolidation of resources. I don't want to maintain N machines to build for N environments. Creating N jails means less machines, but also more processes. By taking the unpack and chroot solution, I think it's pretty simple, straight forward, easy to document, and therefore to implement. I'm asking these questions now because I'm about to implement this at home and document it on http://www.freebsddiary.org/ (see the teaser at http://www.freebsddiary.org/cross-compiling-teaser.php). My main concern is I don't want to be misleading people or giving them a build that contains real problems. My test installs have resulted in a box that runs, but more information is always useful. Thanks. -- Dan Langille : http://www.langille.org/ BSDCan - The Technical BSD Conference - http://www.bsdcan.org/