From owner-freebsd-amd64@FreeBSD.ORG Tue Aug 14 06:15:16 2007 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FCE116A41A for ; Tue, 14 Aug 2007 06:15:16 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 397B713C442 for ; Tue, 14 Aug 2007 06:15:16 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id CAB7920B5; Tue, 14 Aug 2007 07:57:21 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 4E2DB208A; Tue, 14 Aug 2007 07:57:21 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 36C0184462; Tue, 14 Aug 2007 07:57:21 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin References: <20070625191118.U24808@fw.reifenberger.com> <20070729181507.GA85534@rot26.obsecurity.org> <200708131635.05514.jhb@freebsd.org> Date: Tue, 14 Aug 2007 07:57:21 +0200 In-Reply-To: <200708131635.05514.jhb@freebsd.org> (John Baldwin's message of "Mon\, 13 Aug 2007 16\:35\:05 -0400") Message-ID: <86eji6irpa.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-amd64@freebsd.org, Kris Kennaway Subject: Re: i386-RELENG_6 jail under amd64-current? X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2007 06:15:16 -0000 John Baldwin 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