Gentoo Archives: gentoo-user

From: Fernando Rodriguez <frodriguez.developer@×××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Difference between "normal distcc" and "distcc with pump"?
Date: Mon, 04 May 2015 22:08:28
Message-Id: BLU436-SMTP203185A72DFB854C9499FB38DD20@phx.gbl
In Reply to: Re: [gentoo-user] Difference between "normal distcc" and "distcc with pump"? by Fernando Rodriguez
1 On Monday, May 04, 2015 4:36:08 PM Fernando Rodriguez wrote:
2 > On Monday, May 04, 2015 3:41:54 PM Walter Dnes wrote:
3 > > Why is seamonkey the only program (so far for me) that needs "-m32"?
4 > > Would it need "-m64" if it was being cross-compiled on a 32-bit host
5 > > system for 64-bit client? Is there a wiki that we can contribute this
6 > > info to?
7 >
8 > It has to do with my last post. Basicly the makefiles are invoking the full
9 > compiler name for the files that are meant to run on the target but it
10 invokes
11 > just gcc for the files that are meant to run on the host. This is in the
12 > context of cross-compiling, not distcc, so the file that's failing is meant
13 to
14 > run locally (it's a custom build tool). If you where compiling locally (or
15 in
16 > two machines with the same compiler) it would not matter cause the host and
17 > target compiler are the same, but when distcc comes in it builds those files
18 > with the host (system) compiler on the host.
19 >
20 > Changing the c++, cc, gcc, and g++ symlinks to a wrapper script that invokes
21 > the compiler by it's full name as show in the RaspberryPi wiki page *should*
22 > fix it.
23 >
24
25 That sounds confusing cause I use host to mean distcc host at one point and
26 host compiler on another. I will use "server" to refer to distcc host on this
27 post. When you run a GNU standard configure script you can specify two
28 compilers, the host and target compiler. When compiling locally they're both
29 the same. But when cross-compiling the host is the system compiler and is used
30 for compiling things that will be executed as part of the build process (most
31 packages don't do this). On gentoo this is set from the CHOST variable on
32 make.conf, but either it's not usually passed to configure scripts by portage
33 or some scripts just ignore it and invoke the host compiler as cc, c++, g++,
34 or gcc.
35
36 When cross-compiling the target compiler is the one for the target
37 architecture where the package will be deployed to. This is always invoked by
38 the full name (on GNU compliant packages).
39
40 Distcc just traps the compiler invocations on the client and perform the same
41 invokations on the server. In your case the seamonkey is trying to compile
42 something with the host compiler, distcc is trapping it and compiling it with
43 the host compiler on the server. Since the host compiler in the server is not
44 the same as the host compiler on the server things go bad.
45
46 So you don't need -m32 unless you want to use the host compiler on the server.
47 Since you want to use a cross-compiler on the server that was an ugly hack
48 because you're actually using both compilers on the server. If the version of
49 the cross-compiler gets out of sync with the host compiler things can go bad
50 easily. So the proper fix in your scenario is to get rid of the -m32 and make
51 the host compiler links a wapper script so that everything is compiled with
52 the cross-compiler on the server.
53
54 --
55 Fernando Rodriguez