public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Fernando Rodriguez <frodriguez.developer@outlook.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Difference between "normal distcc" and "distcc with pump"?
Date: Mon, 4 May 2015 18:06:18 -0400	[thread overview]
Message-ID: <BLU436-SMTP203185A72DFB854C9499FB38DD20@phx.gbl> (raw)
In-Reply-To: <BLU436-SMTP369AF3BCA2B22423CEE7EA8DD20@phx.gbl>

On Monday, May 04, 2015 4:36:08 PM Fernando Rodriguez wrote:
> On Monday, May 04, 2015 3:41:54 PM Walter Dnes wrote:
> >   Why is seamonkey the only program (so far for me) that needs "-m32"?
> > Would it need "-m64" if it was being cross-compiled on a 32-bit host
> > system for 64-bit client?  Is there a wiki that we can contribute this
> > info to?
> 
> It has to do with my last post. Basicly the makefiles are invoking the full 
> compiler name for the files that are meant to run on the target but it 
invokes 
> just gcc for the files that are meant to run on the host. This is in the 
> context of cross-compiling, not distcc, so the file that's failing is meant 
to 
> run locally (it's a custom build tool). If you where compiling locally (or 
in 
> two machines with the same compiler) it would not matter cause the host and 
> target compiler are the same, but when distcc comes in it builds those files 
> with the host (system) compiler on the host.
> 
> Changing the c++, cc, gcc, and g++ symlinks to a wrapper script that invokes 
> the compiler by it's full name as show in the RaspberryPi wiki page *should* 
> fix it.
> 

That sounds confusing cause I use host to mean distcc host at one point and 
host compiler on another. I will use "server" to refer to distcc host on this 
post. When you run a GNU standard configure script you can specify two 
compilers, the host and target compiler. When compiling locally they're both 
the same. But when cross-compiling the host is the system compiler and is used 
for compiling things that will be executed as part of the build process (most 
packages don't do this). On gentoo this is set from the CHOST variable on 
make.conf, but either it's not usually passed to configure scripts by portage 
or some scripts just ignore it and invoke the host compiler as cc, c++, g++, 
or gcc.

When cross-compiling the target compiler is the one for the target 
architecture where the package will be deployed to. This is always invoked by 
the full name (on GNU compliant packages).

Distcc just traps the compiler invocations on the client and perform the same 
invokations on the server. In your case the seamonkey is trying to compile 
something with the host compiler, distcc is trapping it and compiling it with 
the host compiler on the server. Since the host compiler in the server is not 
the same as the host compiler on the server things go bad.

So you don't need -m32 unless you want to use the host compiler on the server. 
Since you want to use a cross-compiler on the server that was an ugly hack 
because you're actually using both compilers on the server. If the version of 
the cross-compiler gets out of sync with the host compiler things can go bad 
easily. So the proper fix in your scenario is to get rid of the -m32 and make 
the host compiler links a wapper script so that everything is compiled with 
the cross-compiler on the server.

-- 
Fernando Rodriguez


      reply	other threads:[~2015-05-04 22:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-03  1:10 [gentoo-user] Difference between "normal distcc" and "distcc with pump"? Walter Dnes
2015-05-03 18:57 ` Fernando Rodriguez
2015-05-04  3:59   ` Walter Dnes
2015-05-04  9:29     ` Fernando Rodriguez
2015-05-04  9:38       ` Fernando Rodriguez
2015-05-04 15:40       ` Walter Dnes
2015-05-04 19:41       ` Walter Dnes
2015-05-04 20:36         ` Fernando Rodriguez
2015-05-04 22:06           ` Fernando Rodriguez [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BLU436-SMTP203185A72DFB854C9499FB38DD20@phx.gbl \
    --to=frodriguez.developer@outlook.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox