Gentoo Archives: gentoo-user

From: Jeremi Piotrowski <jeremi.piotrowski@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] cross-compile attempt
Date: Sun, 31 Jul 2016 20:15:34
Message-Id: 20160731201519.GA7447@gentoo-tp.home
In Reply to: [gentoo-user] cross-compile attempt by Mick
1 On Sun, Jul 31, 2016 at 07:40:37PM +0100, Mick wrote:
2 >
3 > * ARCH is not set... Are you missing the '/usr/i686-pc-linux-
4 > * gnu/etc/portage/make.profile' symlink? Is the symlink correct? Is your
5 > * portage tree complete?
6 > ===============
7 >
8 > As far as I can tell the link is there:
9 >
10 > # ls -la /usr/i686-pc-linux-gnu/etc/portage/
11 > total 8
12 > drwxr-xr-x 1 root root 56 Jul 31 19:32 .
13 > drwxr-xr-x 1 root root 20 Jul 31 18:32 ..
14 > -rw-r--r-- 1 root root 1019 Jul 31 19:32 make.conf
15 > lrwxrwxrwx 1 root root 30 Jul 31 17:48 make.profile ->
16 > /usr/portage/profiles/embedded
17 > drwxr-xr-x 1 root root 32 Jul 31 18:16 profile
18 >
19 > and it was created when I ran 'crossdev --stable -v -t i686-pc-linux-gnu'.
20 >
21
22 As far as I know, ARCH is one of those variables that has to be specified
23 in a profile, not in make.conf. A quick solution is to place the
24
25 ARCH=x86
26
27 line into the site-specific override .../etc/portage/profile/make.defaults
28
29 Although in this case your choice of profile may simply be wrong. The
30 embedded profile is the crossdev default that pretty much only has
31 busybox. Choose something like default/linux/x86/13.0 or if you want a lighter
32 libc how about default/linux/uclibc/x86 (or hardened/linux/musl/x86). That
33 should give you a more complete @system set.
34
35 >
36 > What am I missing? How would/do you go about achieving the same objective?
37 >
38
39 Since you are doing this on an amd64 box which can natively run x86, if
40 you want to achieve the same goal faster, start with a x86 stage3, chroot
41 into it and emerge a couple packages that you want to add, then tar it up
42 and load onto your 32 bit box. If you want to add packages later, emerge
43 them with '-b' in the chroot (on the amd64 box), and then follow
44
45 https://wiki.gentoo.org/wiki/Binary_package_guide
46
47 to allow the 32-bit box to install them as binary packages.
48
49 Ofcourse if you want to learn crossdev, then this is a great chance to do
50 so.