From owner-freebsd-ports@FreeBSD.ORG Fri May 25 10:12:50 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 895451065675 for ; Fri, 25 May 2012 10:12:50 +0000 (UTC) (envelope-from mueller23@insightbb.com) Received: from mail.insightbb.com (smtp1.insight.synacor.com [208.47.185.23]) by mx1.freebsd.org (Postfix) with ESMTP id 39B0C8FC1A for ; Fri, 25 May 2012 10:12:49 +0000 (UTC) X_CMAE_Category: 0,0 Undefined,Undefined X-CNFS-Analysis: v=1.1 cv=P3haSpIU7i51pxZqH79A8Ic3n3KdEmaQ58/hfsyIl+8= c=1 sm=0 a=zlyAZTzwSgEA:10 a=jLN7EqiLvroA:10 a=0bKMAvo_AAAA:8 a=6I5d2MoRAAAA:8 a=ALLoNhOrIdbsZGNBVpMA:9 a=SV7veod9ZcQA:10 a=Q/oqmR4JO1zR3vNQamCQeQ==:117 X-CM-Score: 0 X-Scanned-by: Cloudmark Authority Engine Authentication-Results: smtp01.insight.synacor.com smtp.mail=mueller23@insightbb.com; spf=softfail; sender-id=softfail Authentication-Results: smtp01.insight.synacor.com header.from=mueller23@insightbb.com; sender-id=softfail Received-SPF: softfail (smtp01.insight.synacor.com: transitional domain insightbb.com does not designate 74.134.26.53 as permitted sender) Received: from [74.134.26.53] ([74.134.26.53:47392] helo=localhost) by mail.insightbb.com (envelope-from ) (ecelerity 2.2.2.40 r(29895/29896)) with ESMTP id AF/67-21868-B1B5FBF4; Fri, 25 May 2012 06:12:43 -0400 Date: Fri, 25 May 2012 06:12:43 -0400 Message-ID: From: "Thomas Mueller" To: freebsd-ports@freebsd.org Cc: Doug Barton , Peter Jeremy Subject: Re: Build ports in chroot for i386 when booted with amd64 kernel? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2012 10:12:50 -0000 > From "Alexander V. Ribchansky" : > May be /usr/ports/ports-mgmt/poudriere + /usr/ports/ports-mgmt/pkg is > what you really need? I took a look at the descriptions for these packages, but don't really think I would need these. Ports would be built to run on the i386 chroot or system. > On 5/24/12 6:47 AM, Thomas Mueller wrote: > >Is it feasible to chroot into an i386 environment when booted to FreeBSD > >amd64 for the purpose of building and installing ports for i386? > this is basically what tinderbox does. > Michael Scheidell, CTO I am only vaguely familiar with tinderbox as such, would likely be guided by the model at http://wiki.freebsd.org/Wine >From Doug Barton : > You need a proper jail with an i386 system installed, not just a chroot. The intent was to build and install a full i386 base system, since I would want to run it on an i386 computer as well as in a chroot on amd64. I think it is possible to cross-build a FreeBSD system, userland and kernel, but this might not apply for ports in general on all FreeBSD-supported architectures. > Yes. I have built i386 code (both world & ports) using both chroot > and jail. The only caveat is that the i386 world should be no newer > than the host kernel. Assuming /tank/m3 has an i386 world installed: > On the host: > # mount -r -t nullfs /usr/src /tank/m3/usr/src > # mount -r -t nullfs /usr/ports /tank/m3/usr/ports > # mount -t devfs devfs /tank/m3/dev > # chroot /tank/m3 bin/sh > Inside the chroot: > # export MACHINE=i386 UNAME_p=i386 UNAME_m=i386 > # cd /usr/src && make buildworld > # cd /usr/ports/.../... && make install > etc > So far, I've only had this fail when building MPIR (which isn't a port and > seems to have broken CPU detection code). > Peter Jeremy I would likely use the same source tree that I used for the latest system update, FreeBSD 9.0-STABLE #9. Tom