1 |
I have an AMD64 desktop/server system (amd64 arch) that I would like |
2 |
to use for cross-compiling packages for my i686 laptop. The problem |
3 |
isn't that my laptop is slow, just that I use it for real work, and |
4 |
pretend work, so I would like to reduce the amount of time and risk |
5 |
involved in keeping it up to date. |
6 |
|
7 |
So far I have tried two methods: |
8 |
|
9 |
1. crossdev. This method works for compiling some packages with: |
10 |
|
11 |
ROOT=/mnt/path PORTAGE_CONFIGROOT=/mnt/path emerge <pkg> |
12 |
|
13 |
But it doesn't work for deep world updates (emerge -DNuv world), as |
14 |
portage ends up using the make.conf from the host, not target. I also |
15 |
have some problems with portage using the hosts package database. |
16 |
|
17 |
Even when building specific packages, there seem to be many packages |
18 |
that fail to link, or run things like freetype-config or kde-config to |
19 |
determine paths for libraries and include files and the like, and that |
20 |
doesn't work right when cross-compiling. |
21 |
|
22 |
2. chroot. I created a chroot environment by copying the actual / and |
23 |
/var filesystems from my laptop, so I could use the actual 32-bit |
24 |
toolchain and package database for my laptop. This works better, as I |
25 |
can at least start deep world updates, and I don't have the link or |
26 |
*-config issues with the crossdev method. The big problem here is |
27 |
packages that use uname or /bin/arch commands to determine the |
28 |
architecture. Since the kerrnel the chroot is running on is still for |
29 |
the amd64 arch, these packages get the idea that they can compile |
30 |
64-bit code, which of course fails miserably with a 32-bit compiler. |
31 |
|
32 |
My current options for making this really are to either setup a |
33 |
virtual machine with something like vmware-server, so that I actually |
34 |
boot the i686 kernel. I would probably try to use an nfs-root for |
35 |
this. Or I can convert my box to an x86 profile, which should also |
36 |
fix my problems with chroot environment. But of course I would lose |
37 |
any ability to play around with the 64-bit stuff, and the ability to |
38 |
file bugs against the packages that (wrongly) look at uname/arch |
39 |
output. |
40 |
|
41 |
So does anybody have an AMD64-to-i686 cross-compiling environment that |
42 |
they are happy with? |
43 |
|
44 |
-Richard |
45 |
-- |
46 |
gentoo-amd64@g.o mailing list |