Date: Tue, 6 May 2008 12:27:37 -0400 From: "Josh Carroll" <josh.carroll@gmail.com> To: "Andrew Cid" <andrew@accid.net> Cc: freebsd-questions@freebsd.org Subject: Re: Cross compiling i386 packages on amd64 Message-ID: <8cb6106e0805060927n70035048n5c1e8d1cb5a07b15@mail.gmail.com> In-Reply-To: <20080506162104.GA55284@farnborough.darq.net> References: <20080506162104.GA55284@farnborough.darq.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 6, 2008 at 12:21 PM, Andrew Cid <andrew@accid.net> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8cb6106e0805060927n70035048n5c1e8d1cb5a07b15>