Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Sync'ing and compiling pkgs for multiple PCs Eric Martin <freak4uxxx@×××××.com>
Re: [gentoo-user] Sync'ing and compiling pkgs for multiple PCs Simon <turner25@×××××.com>