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