From owner-freebsd-questions@FreeBSD.ORG Sat Nov 10 14:06:03 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C01F16A41B for ; Sat, 10 Nov 2007 14:06:03 +0000 (UTC) (envelope-from rehsack@web.de) Received: from fmmailgate09.web.de (fmmailgate09.web.de [217.72.192.184]) by mx1.freebsd.org (Postfix) with ESMTP id F022813C4B7 for ; Sat, 10 Nov 2007 14:06:02 +0000 (UTC) (envelope-from rehsack@web.de) Received: from web.de by fmmailgate09.web.de (Postfix) with SMTP id 3D25E1502BE4 for ; Sat, 10 Nov 2007 14:13:37 +0100 (CET) Received: from [80.134.76.166] by freemailng6401.web.de with HTTP; Sat, 10 Nov 2007 14:13:37 +0100 Date: Sat, 10 Nov 2007 14:13:37 +0100 Message-Id: <458911581@web.de> MIME-Version: 1.0 From: Jens Rehsack To: freebsd-questions@freebsd.org Precedence: fm-user Organization: http://freemail.web.de/ X-Provags-Id: V01U2FsdGVkX19UC/uGVRIJ66vDVSOn2RsngvCSqy8WU/9s6AzqBvA/sbIq8 hbvAGieACe7pJWLlVoFGEw/0IZXpLJTrGsU1X8wHYkpXULblGI= Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Subject: Cross Platform Port Builds X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2007 14:06:03 -0000 Hi all, I'm going to update my machines and run into a serious problem (for me ^^): Some ports fail to cross build and I fail to setup a sane environment. At first, I created a chroot: /usr/room/$target. Into this chroot, I installed a host world using make installworld DESTDIR=/usr/room/$target/. After that, I created /usr/room/$target/usr/src and /usr/room/$target/usr/ports and mounted /usr/src and /usr/ports to there, respectively. Sure I'd mounted a devfs to /usr/room/$target/dev/. Then I's chrooted to /usr/room/$target/ and change the make.conf as needed for target machine and did make buildworld/buildkernel in /usr/src in the chroot. That worked really fine. But on the target machine not only a FreeBSD base distribution runs, there is a samba, xinetd, ftpproxy and squid also doing some work. So I needed to cross-build those ports, too. I couldn't find a standardized way to do this, so I first created 2 start scripts: waldorf# cat ~/bin/portcross #!/bin/sh env ARCH=i386 TARGET_CPUTPE= CPUTYPE=pentiumpro PATH=/usr/obj/i386/usr/src/tmp/usr/bin/:$PATH "$@" waldorf# cat ~/bin/porthost #!/bin/sh env CPUTYPE=nocona "$@" portcross I use to make/portupgrade a crossbuild (e.g. squid), porthost to build tools like autoconf. Now I run into problems (as the more expertized may imagine): autoconf needs gettext, samba needs gettext. But the amd64-native auto-tools binaries can't load the ia32 gettext library - and I don't know how to hold them both without running into conflicts. Furthermore perl seems to be resistant against crossbuild by specifying ARCH=i386 make build and above listed portcross. Any idea how to crossbuild perl? Thanks in advance, Jens