From owner-freebsd-questions@FreeBSD.ORG Tue May 6 16:27:51 2008 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 62626106567A for ; Tue, 6 May 2008 16:27:51 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 1ED788FC48 for ; Tue, 6 May 2008 16:27:50 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so763873ywe.13 for ; Tue, 06 May 2008 09:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YUBA2vZitonHZG2ByfO+iqkatyf0/MMHg0pAf8788uU=; b=BJvaXReYwhyEn6PqKk/SLZvLEJcV7XCdy+thFf52fof96tp39BYh3l19AB8KB80RtgyFElZG+jbZ10AbrbA6XTHO9rXIBql/Amzz2B3h/5K3ORG7Q0WBWa+oeQQAyjCEFWPRM+QE7FJeIj1zIlpZm+dg1wphyy3+Szdedjro3xI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ID7q25HVrHoha3JXK1CO4jDP+naq2uVPIcuCGSncB5w8ZSOhlXglZmfD30wr258zXMW09srjBGBTJKYJC5LlKZLCktv5ubqK2JjVq+X0qcfeFVPyWNWaZpDHm0u89KQIkS1qGEOhV0wz0ww5S0kOmbBIrYRBPhJg9zDqsBLGazk= Received: by 10.150.228.12 with SMTP id a12mr885045ybh.244.1210091257816; Tue, 06 May 2008 09:27:37 -0700 (PDT) Received: by 10.150.140.14 with HTTP; Tue, 6 May 2008 09:27:37 -0700 (PDT) Message-ID: <8cb6106e0805060927n70035048n5c1e8d1cb5a07b15@mail.gmail.com> Date: Tue, 6 May 2008 12:27:37 -0400 From: "Josh Carroll" To: "Andrew Cid" In-Reply-To: <20080506162104.GA55284@farnborough.darq.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080506162104.GA55284@farnborough.darq.net> Cc: freebsd-questions@freebsd.org Subject: Re: Cross compiling i386 packages on amd64 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 May 2008 16:27:51 -0000 On Tue, May 6, 2008 at 12:21 PM, Andrew Cid wrote: > Hi all, > > I have an i386 jail running on an amd64 host that I use to build > packages. Most packages build fine, however I have a few that fail. > This includes xorg (dri won't build) and mplayer. In all cases I get an > error messages similar to this: > > {standard input}:147: Error: `(%rsi)' is not a valid 32 bit base/index expression > {standard input}:148: Error: `(%rsi,%rax)' is not a valid 32 bit base/index expression > gmake[1]: *** [pullup.o] Error 1 > > Any ideas how I can fix this? There are some tricks you can play. Notably, you need to trick auto* tools into thinking it's an i386 system. I think setting UNAME_m=i386 does the trick there: > uname -a FreeBSD pflog.net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Feb 26 01:20:52 EST 2008 root@pflog.net:/usr/obj/usr/src/sys/PFLOG amd64 > setenv UNAME_m i386 > uname -a FreeBSD pflog.net 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Tue Feb 26 01:20:52 EST 2008 root@pflog.net:/usr/obj/usr/src/sys/PFLOG i386 I believe there is something else I'm forgetting that you need to do to make compilation happy for some ports, but I can't recall them at the moment. Of course, things that expect to talk to an i386 kernel aren't going to work, and you may have issues with things that use hand-written ASM. Try setting UNAME_m though and see if it helps. It might also be wise to set ARCH=i386 and/or TARGET_ARCH=i386 in /etc/ports.conf. Josh