Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2007 07:57:21 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        John Baldwin <jhb@freebsd.org>
Cc:        freebsd-amd64@freebsd.org, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: i386-RELENG_6 jail under amd64-current?
Message-ID:  <86eji6irpa.fsf@ds4.des.no>
In-Reply-To: <200708131635.05514.jhb@freebsd.org> (John Baldwin's message of "Mon\, 13 Aug 2007 16\:35\:05 -0400")
References:  <20070625191118.U24808@fw.reifenberger.com> <20070729181507.GA85534@rot26.obsecurity.org> <200708131635.05514.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin <jhb@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.s=
o.1=20
> 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=3Di386 and
MACHINE_ARCH=3Di386 to /etc/make.conf and using the following patch:

Index: Makefile.inc1
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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 @@
 .endif
 .if make(buildworld)
 BUILD_ARCH!=3D   uname -p
+.if ${MACHINE_ARCH} =3D=3D i386 && ${BUILD_ARCH} =3D=3D amd64
+BUILD_ARCH=3D    i386
+.endif
 .if ${MACHINE_ARCH} !=3D ${BUILD_ARCH}
 .error To cross-build, set TARGET_ARCH.
 .endif

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)

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86eji6irpa.fsf>