Gentoo Archives: gentoo-user

From: Peter Humphrey <peter@××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [SOLVED] gcc-6.4.0-r1::gentoo failed (compile phase)
Date: Wed, 28 Mar 2018 16:40:23
Message-Id: 2299991.dI5p2HNeCy@peak
In Reply to: Re: [gentoo-user] [SOLVED] gcc-6.4.0-r1::gentoo failed (compile phase) by thelma@sys-concept.com
1 On Wednesday, 28 March 2018 16:14:49 BST thelma@×××××××××××.com wrote:
2 > On 03/28/2018 01:32 AM, Peter Humphrey wrote:
3 [...]
4 > > I have a similar system, but Atom N270. I wouldn't want to compile much on
5 > > it, and certainly not GCC. I NFS-export its $PORTDIR to this much more
6 > > powerful box, do the emerging here and then just install packages on the
7 > > Atom. Still not exactly fast, but incomparably better.
8 >
9 > I should have done it as well, it is a bit too late I have only
10 > 45-packages left to compile out of 710.
11 > Is it better use NFS or distcc?
12 > Do you have a good link how to do it with: "NFS-export $PORTDIR"
13
14 I think NFS may be simpler to operate, but that may be because I'm more
15 familiar with it. You just need something like this in the Atom's /etc/
16 exports: /usr/portage 192.168.1.5(rw,no_subtree_check,anonuid=250,anongid=250,no_wdelay)
17
18 That IP address is the big beast host, and of course 250 is the portage user.
19
20 I don't know of a guide on the web, but basically, the method is to construct
21 a 32-bit chroot on your host system and install a mirror of your Atom system
22 in it. Copy your Atom's /etc/portage directory into the chroot and adjust
23 things like --jobs to suit the chroot host, but make sure all the USE flags
24 are the same as on the Atom. It'll take an hour or two to build the system,
25 but you only have to do it once, and of course it'll be done at the speed of
26 your host machine. You don't need to keep running etc-update or equivalent;
27 just build the binaries.
28
29 My chroot is /mnt/atom and this script starts it ready to chroot into:
30
31 $ cat /etc/init.d/atom
32 #!/sbin/openrc-run
33
34 depend() {
35 need localmount
36 need bootmisc
37 }
38
39 start() {
40 ebegin "Mounting 32-bit chroot dirs under /mnt/atom"
41 mount -t proc /proc /mnt/atom/proc
42 mount --rbind /dev /mnt/atom/dev
43 mount --rbind /sys /mnt/atom/sys
44 mount -t tmpfs tmpfs -o noatime,nosuid,nodev,noexec,mode=1777 /mnt/atom/tmp
45 mount -t tmpfs tmpfs -o noatime,uid=portage,gid=portage,mode=0775 /mnt/atom/var/tmp/portage
46 mount -t nfs -o vers=3 192.168.1.2:/usr/portage /mnt/atom/usr/portage
47 rm -f /mnt/atom/etc/mtab
48 cp /etc/mtab.atom /mnt/atom/etc/mtab
49 eend $? "Error mounting 32-bit chroot directories"
50 }
51
52 stop() {
53 ebegin "Unmounting 32-bit /mnt/atom chroot dirs"
54 rm /mnt/atom/etc/mtab
55 ln -s /proc/self/mounts /mnt/atom/etc/mtab
56 umount -R /mnt/atom
57 mount /mnt/atom
58 }
59
60 You may prefer not to bother with tmpfs, but I have 32GB RAM on my host, so
61 it's efficient here. That IP address is the Atom machine.
62
63 No doubt someone more skilled than me at bash scripting could improve on my
64 script; suggestions welcome.
65
66 After updating the chroot you can emerge -k or -K on your Atom machine, after
67 syncing which will now be the most time-consuming part of the operation.
68
69 Let me know if anything isn't clear.
70
71 Thanks to Neil Bothwick, who showed me how to do this several years ago.
72
73 --
74 Regards
75 Peter

Replies

Subject Author
Re: [gentoo-user] [SOLVED] gcc-6.4.0-r1::gentoo failed (compile phase) thelma@×××××××××××.com
[gentoo-user] Re: gcc-6.4.0-r1::gentoo failed (compile phase) Ian Zimmerman <itz@××××××××××××.org>