Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hoping someone can help explain distcc to me
Date: Wed, 24 Aug 2011 11:06:50
Message-Id: 4E54DAC7.4050902@gmail.com
In Reply to: Re: [gentoo-user] Hoping someone can help explain distcc to me by Peter Humphrey
1 Peter Humphrey wrote:
2 > On Sunday 21 August 2011 04:04:05 Matthew Finkel wrote:
3 >
4 >
5 >> On Sat, Aug 20, 2011 at 10:46 PM, Dale<rdalek1967@×××××.com> wrote:
6 >>
7 >>> How hard is it to set up a 64 bit machine to compile programs for a 32
8 >>> bit system?
9 >>>
10 >>> Dale
11 >>>
12 >>> :-) :-)
13 >>>
14 >> It's actually quite easy. IIRC, when I did it last, the only difference
15 >> is that when you chroot into the subsystem you need prefix the command
16 >> with linux32, e.g. linux32 chroot /path/to/chroot /bin/bash
17 >>
18 > Yes, just follow this guide:
19 > http://www.gentoo.org/proj/en/base/amd64/howtos/chroot.xml
20 >
21 > I did that and it was straightforward as far as I remember. I did spend some
22 > time thinking at a few stages, to get an understanding of what I was doing
23 > rather than just blindly following somebody else's prescription.
24 >
25 > Then it's a matter of writing some simple scripts to mount the packages
26 > directory on the big host. Here's mine, most of which I scrounged from
27 > somewhere:
28 >
29 > $ cat /etc/init.d/atom
30 > #!/sbin/runscript
31 >
32 > depend() {
33 > need localmount
34 > need bootmisc
35 > }
36 >
37 > start() {
38 > ebegin "Mounting 32-bit chroot dirs"
39 > mount -o bind /dev /mnt/atom/dev>/dev/null
40 > mount -o bind /dev/pts /mnt/atom/dev/pts>/dev/null
41 > mount -o bind /dev/shm /mnt/atom/dev/shm>/dev/null
42 > mount -t proc /proc /mnt/atom/proc>/dev/null
43 > mount -o bind /sys /mnt/atom/sys>/dev/null
44 > mount -o bind /tmp /mnt/atom/tmp>/dev/null
45 > mount -t nfs -o vers=3 192.168.2.2:/usr/portage/packages
46 > /mnt/atom/usr/portage/packages
47 > eend $? "An error occurred while attempting to mount 32-bit chroot
48 > directories"
49 > ebegin "Copying 32-bit chroot files"
50 > cp -pf /etc/resolv.conf /mnt/atom/etc/>/dev/null
51 > cp -pf /etc/passwd /mnt/atom/etc/>/dev/null
52 > cp -pf /etc/shadow /mnt/atom/etc/>/dev/null
53 > cp -pf /etc/group /mnt/atom/etc/>/dev/null
54 > cp -pf /etc/hosts /mnt/atom/etc/> /dev/null
55 > cp -Ppf /etc/localtime /mnt/atom/etc/>/dev/null
56 > eend $? "An error occurred while attempting to copy 32-bit chroot files."
57 > }
58 >
59 > stop() {
60 > ebegin "Unmounting 32-bit chroot dirs"
61 > umount -f /mnt/atom/dev/pts>/dev/null
62 > umount -f /mnt/atom/dev/shm>/dev/null
63 > umount -f /mnt/atom/dev>/dev/null
64 > umount -f /mnt/atom/proc>/dev/null
65 > umount -f /mnt/atom/sys>/dev/null
66 > umount -f /mnt/atom/tmp>/dev/null
67 > umount -f /mnt/atom/usr/portage/packages>/dev/null
68 > eend $? "An error occurred while attempting to unmount 32-bit chroot
69 > directories"
70 > }
71 >
72 > I could list the steps of my daily routine to upgrade both the client and
73 > the chroot if that would help.
74 >
75 >
76
77 I followed the guide and some info here and it seems to have worked
78 great. I'm glad. The cooler on the heatsink is VERY whimpy. It's
79 aluminum and has a little 60mm fan on it. I didn't measure it but its
80 certainly not as big as my 80mm. I can barely feel the air it moves.
81 Compiling on htat would likely be a problem pretty quick.
82
83 Now to get the install moved over to the other rig. DVD and a tarball
84 maybe? Hmmmm, I got to think on this one. It's almost 5Gbs worth.
85 Maybe man scp will help. ;-)
86
87 Thanks for the link. This was awesome!!
88
89 Dale
90
91 :-) :-)
92
93 P. S. Now I can build binaries for my old rig too. :-D