Gentoo Archives: gentoo-user

From: Eric Martin <freak4uxxx@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Sync'ing and compiling pkgs for multiple PCs
Date: Thu, 31 Jul 2008 11:03:01
Message-Id: 48919BD5.5080008@gmail.com
In Reply to: Re: [gentoo-user] Sync'ing and compiling pkgs for multiple PCs by Stroller
1 Stroller wrote:
2 >
3 > On 31 Jul 2008, at 01:59, Simon wrote:
4 >> ...
5 >>> Your email is very long, so I'm not sure if I've taken it all in, but
6 >>> what I'd suggest is a shared /usr/portage directory (easily done by
7 >>> NFS) and distcc.
8 >>
9 >> This creates a dependency on the host that contains the portage tree.
10 >> It also remove some flexibility. For example, taking my laptop away
11 >> from my 'portage pc' would make it impossible for me to modify my
12 >> current installs while away. There are other consideration and the
13 >> use of a sync'ed portage tree on each pc vs using nfs is a debate that
14 >> I won't go into now and this part is not much of an importance in my
15 >> problem... compilation is!...
16 >
17 > Yes, your words about "dependency" and "flexibility" are valid, but this
18 > is also the most straightforward way to sync multiple machines at once.
19 > If you do need to emerge a package when the laptop is away from home
20 > then just --sync and it builds a portage tree at the "missing
21 > mountpoint" (if that makes sense).
22 >
23 > You may find it more elegant to make the one machine an rsync server for
24 > the others.
25 > http://www.gentoo.org/doc/en/rsync.xml
26 >
27 >>> distcc is, IMO, a bit more elegant than (for instance) trying to
28 >>> manually emerge binary packages for machine A on PC B. You can tell
29 >>> it to share the work or just unload it to the most powerful machine.
30 >>> There may be concerns about using a binary package if USE flags are
31 >>> different between the two machines, but distcc ensures that the
32 >>> package is built using those defined in make.conf of the machine on
33 >>> which you're running emerge.
34 >>
35 >> Yes! I was actually trying distcc today for the first time and got it
36 >> working from the perspective of my fastest computer, I got some
37 >> trouble though (see below). What you mentioned about running the
38 >> `emerge -uDN world` on each individual machines + sharing built
39 >> packages is absolutely awesome. Best of all worlds if i could say!
40 >
41 > Great! I'm glad you're happy with this. You're NFS exporting a
42 > sub-directory of /usr/portage, then, in order to share the built packages?
43 >
44 >> However, when using distcc, I first made a trial with a small package
45 >> 'xmahjongg' and got a nice x4 speedup on the overall emerge. I wanted
46 >> to try with a larger package, 'povray' and stumbled on a linker issue,
47 >> the issue is described below and this is the only obstacle on my way
48 >> now. As I fear doing a `emerge -e system && emerge -e world` would
49 >> never complete using distcc...
50 >>
51 >> Doing: `time emerge povray` without distcc yields a functionnal
52 >> package, while when distcc was enabled, I would get lots of undefined
53 >> references to some __pthreads functions. But I just tried and it
54 >> seems to work fine, not reproducible, so I'll drop my distcc issue and
55 >> go on with the -e recompilation.
56 >
57 >
58 > I assume that the "undefined references to __pthreads function" are
59 > errors which stop the compile? Or that they occur when you start the
60 > app, causing it to crash? Rather than compilation warnings?
61 >
62 > I assume compilation errors. My usage is that I can turn distcc off for
63 > the duration of the compile when I see something like this, and not
64 > bother investigating it further, but I think the most likely cause is
65 > that a library is needed for compilation that is not present on the
66 > distcc server. Portage accepts the compile-time dependency because it is
67 > filled on the distcc client, the machine on which you've run emerge, but
68 > when that particular bit is sent off to the distcc server then that
69 > machine doesn't have the lib needed.
70 >
71 > I would imagine that, assuming the above belief is correct, then the
72 > workaround would be to `emerge -o` the package on the other machines on
73 > your LAN (or the fastest machine, if you are using only that to emerge)
74 > before distcc'ing it. This is slightly inelegant.
75 >
76 > If you mostly have the same packages on all machines then hopefully you
77 > shouldn't encounter this scenario too often, although I'd also think
78 > that different USE flags could affect it.
79 >
80 > I'm also somewhat suspicious of different architectures - you wouldn't
81 > try compiling for ARM or MIPS on an x86 PC, but I'm not sure how
82 > compiling on an Athlon for a Pentium 3 or 4 affects things. Finally you
83 > should make sure all machines are using the same versions of gcc and
84 > glibc (also binutils? what else?).
85 >
86 > Stroller.
87 >
88
89 You can cross compile, I've done it multiple times before When my Athlon
90 built packages for my celerons. Check out the Distcc-Cross Compile
91 guide here [1]. Apparently the doc has been updated since I last
92 checked as the tools have gotten full rewrites.
93
94 1) http://www.gentoo.org/doc/en/cross-compiling-distcc.xml
95
96 --
97 Eric Martin
98 Key fingerprint = D1C4 086E DBB5 C18E 6FDA B215 6A25 7174 A941 3B9F

Attachments

File name MIME type
signature.asc application/pgp-signature