i386-RELENG_6 jail under amd64-current?

Dag-Erling Smørgrav des at des.no
Tue Aug 14 06:15:16 UTC 2007

John Baldwin <jhb at freebsd.org> writes:
> On Sunday 29 July 2007 02:15:07 pm Kris Kennaway wrote:
> > On Mon, Jun 25, 2007 at 07:24:50PM +0200, Michael Reifenberger wrote:
> > > has anybody managed to set up an jail under amd64-current (64bit)
> > > which runs i386-RELENG_6 (32bit) binaries.
> > Either just symlink lib32 where the linker is looking for them, or set
> > the LD_32_LIBRARY_PATH or similar.  It would be nice if the rtld
> > recognized it was living in an i386 world automatically.
> You could try copying an i386 /libexec/ld-elf.so.1 to /libexec/ld-elf32.so.1 
> inside the chroot.

Or just symlinking it; works fine for me.  I was even able to upgrade
the chroot from source (from within itself) by adding MACHINE=i386 and
MACHINE_ARCH=i386 to /etc/make.conf and using the following patch:

Index: Makefile.inc1
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.584
diff -u -r1.584 Makefile.inc1
--- Makefile.inc1       10 Jul 2007 10:19:45 -0000      1.584
+++ Makefile.inc1       29 Jul 2007 19:23:35 -0000
@@ -143,6 +143,9 @@
 .if make(buildworld)
 BUILD_ARCH!=   uname -p
+.if ${MACHINE_ARCH} == i386 && ${BUILD_ARCH} == amd64
+BUILD_ARCH=    i386
 .error To cross-build, set TARGET_ARCH.

In my case, the chroot is actually the NFS-exported file system for my
diskless crash boxen (which are the only 32-bit systems I have left)

Dag-Erling Smørgrav - des at des.no

More information about the freebsd-amd64 mailing list