Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 May 2012 06:12:43 -0400
From:      "Thomas Mueller" <mueller23@insightbb.com>
To:        freebsd-ports@freebsd.org
Cc:        Doug Barton <dougb@FreeBSD.org>, Peter Jeremy <peter@rulingia.com>
Subject:   Re: Build ports in chroot for i386 when booted with amd64 kernel?
Message-ID:  <AF.67.21868.B1B5FBF4@smtp01.insight.synacor.com>

next in thread | raw e-mail | index | archive | help
> From "Alexander V. Ribchansky" <triosoft@triosoft.com.ua>:

> 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 <dougb@FreeBSD.org>:

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AF.67.21868.B1B5FBF4>