From owner-freebsd-amd64@FreeBSD.ORG Wed Nov 28 22:29:22 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 0238316A469 for ; Wed, 28 Nov 2007 22:29:22 +0000 (UTC) (envelope-from markd@kermodei.com) Received: from nlpi043.prodigy.net (nlpi043.sbcis.sbc.com [207.115.36.72]) by mx1.freebsd.org (Postfix) with ESMTP id C631A13C4CC for ; Wed, 28 Nov 2007 22:29:21 +0000 (UTC) (envelope-from markd@kermodei.com) X-ORBL: [67.123.80.209] Received: from osprey.kermodei.com (osprey.kermodei.org [67.123.80.209]) by nlpi043.prodigy.net (8.13.8 out.dk.spool/8.13.8) with ESMTP id lASMHjcw020728 for ; Wed, 28 Nov 2007 16:17:45 -0600 Received: from localhost (osprey.kermodei.com [127.0.0.1]) by osprey.kermodei.com (Postfix) with SMTP id 7E0EE95823 for ; Wed, 28 Nov 2007 14:17:45 -0800 (PST) Received: by osprey.kermodei.com (Postfix, from userid 1000) id C8D5595821; Wed, 28 Nov 2007 14:17:43 -0800 (PST) From: Mark Diekhans MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="RbP5SQQdHL" Content-Transfer-Encoding: 7bit Message-ID: <18253.59655.589673.70102@osprey.kermodei.com> Date: Wed, 28 Nov 2007 14:17:43 -0800 To: wb@arb-phys.uni-dortmund.de (W.B. Kloke) In-Reply-To: <1196266496.551294@vestein.arb-phys.uni-dortmund.de> References: <1196266496.551294@vestein.arb-phys.uni-dortmund.de> X-Mailer: VM 7.19 under Emacs 22.1.1 X-DSPAM-Result: Innocent X-DSPAM-Processed: Wed Nov 28 14:17:45 2007 X-DSPAM-Confidence: 1.0000 X-DSPAM-Probability: 0.0023 X-DSPAM-Signature: 348,474de9096621836580316 Cc: freebsd-amd64@freebsd.org Subject: Re: How to compile 32bit applications on FreeBSD-amd64? 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: Wed, 28 Nov 2007 22:29:22 -0000 --RbP5SQQdHL Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit W.B. Kloke writes: > Is there an easy way to build a 32bit application on an amd64 system? With sufficient disk space, its straight forward. I set up a fake root directory, extract a minimal i386 FreeBSD system into it. The attached script is used to start a 32bit chroot-ed environment, either to run a command or start a shell. I have successfully built a large number of 32-bit ports on a amd64 bit server this way. Let me know if you have more questions. Mark --RbP5SQQdHL Content-Type: text/plain Content-Disposition: inline; filename="start-i386" Content-Transfer-Encoding: 7bit #!/bin/sh -e # start-i386 [cmd ..] # from http://www.nabble.com/i386-package-building-on-an-amd64-system-t4441068.html ROOT=/b/jails/i386 REVISION="6.2" BRANCH="stable" OSVERSION=602112 UNAME_s="FreeBSD" UNAME_m="i386" UNAME_p="i386" UNAME_r=$REVISION-$BRANCH UNAME_v="$UNAME_s $UNAME_r #6: Sun Sep 23 11:41:48 PDT 2007 root@osprey.kermodei.com:/usr/src/sys/i386/compile/OSPREY" export UNAME_s UNAME_r UNAME_v UNAME_m UNAME_p OSVERSION ROOT if [ -r $ROOT/dev/zero ] then echo dev already mounted else mount -t devfs dev $ROOT/dev fi ln -sf ld-elf.so.1 $ROOT/libexec/ld-elf32.so.1 echo "libpthread.so.2 libthr.so.2 libpthread.so libthr.so" > ${ROOT}/etc/libmap.conf cp ${ROOT}/etc/libmap.conf ${ROOT}/etc/libmap32.conf mkdir -p ${ROOT}/usr/local/bin cp /usr/local/bin/bsdmake ${ROOT}/usr/local/bin cp /etc/make.conf ${ROOT}/etc/ cp /etc/resolv.conf ${ROOT}/etc/ cp /etc/hosts ${ROOT}/etc/ HOME=/root export HOME if [ $# = 0 ] ; then exec chroot $ROOT /bin/csh else echo "$@" | exec chroot $ROOT /bin/sh fi --RbP5SQQdHL--