Gentoo Archives: gentoo-amd64

From: Peter Hoff <petehoff@×××××××.net>
To: gentoo-amd64@l.g.o
Subject: Re: [gentoo-amd64] Best plan for cross compiling for i686
Date: Sat, 05 Aug 2006 23:35:15
Message-Id: 20060805233319.61131.qmail@web82706.mail.mud.yahoo.com
In Reply to: [gentoo-amd64] Best plan for cross compiling for i686 by Richard Fish
1 ----- Original Message ----
2 From: Richard Fish <bigfish@××××××××××.org>
3 To: gentoo-amd64@l.g.o
4 Sent: Saturday, August 5, 2006 2:08:25 PM
5 Subject: [gentoo-amd64] Best plan for cross compiling for i686
6
7 I have an AMD64 desktop/server system (amd64 arch) that I would like
8 to use for cross-compiling packages for my i686 laptop. The problem
9 isn't that my laptop is slow, just that I use it for real work, and
10 pretend work, so I would like to reduce the amount of time and risk
11 involved in keeping it up to date.
12
13 So far I have tried two methods:
14
15 1. crossdev. This method works for compiling some packages with:
16
17 ROOT=/mnt/path PORTAGE_CONFIGROOT=/mnt/path emerge <pkg>
18
19 But it doesn't work for deep world updates (emerge -DNuv world), as
20 portage ends up using the make.conf from the host, not target. I also
21 have some problems with portage using the hosts package database.
22
23 Even when building specific packages, there seem to be many packages
24 that fail to link, or run things like freetype-config or kde-config to
25 determine paths for libraries and include files and the like, and that
26 doesn't work right when cross-compiling.
27
28 2. chroot. I created a chroot environment by copying the actual / and
29 /var filesystems from my laptop, so I could use the actual 32-bit
30 toolchain and package database for my laptop. This works better, as I
31 can at least start deep world updates, and I don't have the link or
32 *-config issues with the crossdev method. The big problem here is
33 packages that use uname or /bin/arch commands to determine the
34 architecture. Since the kerrnel the chroot is running on is still for
35 the amd64 arch, these packages get the idea that they can compile
36 64-bit code, which of course fails miserably with a 32-bit compiler.
37
38 My current options for making this really are to either setup a
39 virtual machine with something like vmware-server, so that I actually
40 boot the i686 kernel. I would probably try to use an nfs-root for
41 this. Or I can convert my box to an x86 profile, which should also
42 fix my problems with chroot environment. But of course I would lose
43 any ability to play around with the 64-bit stuff, and the ability to
44 file bugs against the packages that (wrongly) look at uname/arch
45 output.
46
47 So does anybody have an AMD64-to-i686 cross-compiling environment that
48 they are happy with?
49
50 -Richard
51 --
52 gentoo-amd64@g.o mailing list
53
54
55 Have you thought about using Xen to create a virtual copy of your laptop on your server? I have no idea if it would actually work, or to what extent it's possible to virtualize the 'hardware', but it might be worth looking into.

Replies

Subject Author
Re: [gentoo-amd64] Best plan for cross compiling for i686 Paul de Vrieze <pauldv@g.o>