From owner-freebsd-emulation@FreeBSD.ORG Tue Oct 18 18:47:24 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 14BD216A41F for ; Tue, 18 Oct 2005 18:47:24 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87EF543D46 for ; Tue, 18 Oct 2005 18:47:23 +0000 (GMT) (envelope-from ambrisko@ambrisko.com) Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by mail.ambrisko.com with ESMTP; 18 Oct 2005 11:47:23 -0700 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.12.11/8.12.9) with ESMTP id j9IIlN7j058984; Tue, 18 Oct 2005 11:47:23 -0700 (PDT) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.12.11/8.12.11/Submit) id j9IIlNNf058983; Tue, 18 Oct 2005 11:47:23 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200510181847.j9IIlNNf058983@ambrisko.com> In-Reply-To: <43550620.1687.9A6B18FF@localhost> To: Dan Langille Date: Tue, 18 Oct 2005 11:47:23 -0700 (PDT) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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 18:47:24 -0000 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! Doug A.