1 |
On Monday, May 04, 2015 5:29:34 AM Fernando Rodriguez wrote: |
2 |
> On Sunday, May 03, 2015 11:59:08 PM Walter Dnes wrote: |
3 |
> > On Sun, May 03, 2015 at 02:57:46PM -0400, Fernando Rodriguez wrote |
4 |
> > |
5 |
> > > Some packages do custom preprocessing and other weird things during |
6 |
> > > the build process that cause problems with pump mode since it caches |
7 |
> > > copies of the unmodified headers. If you're lucky it just fails (and |
8 |
> > > usually falls back on compiling locally), if you're not then it may |
9 |
> > > succeed and you'll get runtime bugs. I haven't find a package yet |
10 |
> > > that fails without pump mode as long as your CFLAGS are set properly. |
11 |
> > |
12 |
> > Seamonkey fails during the build process. Two tries, and the build |
13 |
> > log was 74,046 bytes each time. I have an Intel x86_64 as the host, and |
14 |
> > an Atom i686 (32-bit only) as the client. Given your description, I may |
15 |
> > drop "pump" altogether from my "xmerge" script. I'll unmerge |
16 |
> > seamonkey-bin, and try distcc-building seamonkey from source, without |
17 |
> > "pump", Monday when I have more time. Here are a few lines from the |
18 |
> > failed build log, using "pump"... |
19 |
> > |
20 |
> > Executing: gcc -o nsinstall_real -march=atom -mtune=atom -fstack-protector |
21 |
- |
22 |
> pipe -mno-avx -DXP_UNIX -MD -MP -MF .deps/nsinstall_real.pp -O2 -DUNICODE - |
23 |
> D_UNICODE -Wl,-O1 -Wl,--as-needed host_nsinstall.o host_pathsub.o |
24 |
> > |
25 |
> > /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/../../../../i686-pc-linux-gnu/bin/ld: |
26 |
> i386:x86-64 architecture of input file `host_nsinstall.o' is incompatible |
27 |
with |
28 |
> i386 output |
29 |
> > |
30 |
> > /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/../../../../i686-pc-linux-gnu/bin/ld: |
31 |
> i386:x86-64 architecture of input file `host_pathsub.o' is incompatible with |
32 |
> i386 output |
33 |
> > |
34 |
> > /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/../../../../i686-pc-linux-gnu/bin/ld: |
35 |
> host_nsinstall.o: file class ELFCLASS64 incompatible with ELFCLASS32 |
36 |
> > |
37 |
> > /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/../../../../i686-pc-linux-gnu/bin/ld: |
38 |
> final link failed: File in wrong format |
39 |
> > |
40 |
> > |
41 |
> |
42 |
> The error on the link that you posted looks like cause by pump mode, this |
43 |
one |
44 |
> I'm not so sure. |
45 |
> |
46 |
> It looks like you're not using the cross compiler on the host as it would |
47 |
not |
48 |
> generate 64 bit code. Did you add -m32 to your CFLAGS on the client box? |
49 |
Also |
50 |
> you may need to set the custom-cflags use flag. Can you verify that it is |
51 |
using |
52 |
> the cross compiler on the host? |
53 |
> |
54 |
> I'm not sure exactly what the gentoo recommended distcc/cross compile setup |
55 |
> but if you do it like I suggested on your other thread (using the host 64bit |
56 |
> compiler) it should work. Look at the links you got under |
57 |
/usr/lib/distcc/bin. |
58 |
> All you need to do is create scripts on the host with the exact same names |
59 |
and |
60 |
> have them execute the compiler that you want with the options you want (I |
61 |
just |
62 |
> have it execute the 64bit compiler with -m32). Then make sure that distccd |
63 |
(on |
64 |
> host) finds them before the actual compiler by putting it in the PATH |
65 |
> environment variable before anything else. For that you may need to modify |
66 |
the |
67 |
> init script or unit file if using systemd or just start distccd manually. |
68 |
> |
69 |
> A simpler hack is to just delete the c++, cc, gcc, and g++ symlinks from the |
70 |
> /usr/lib/distcc/bin directory. That will force distcc to only trap the |
71 |
> compiler invocations that use the full compiler name and end up using the |
72 |
> cross compiler in the host, but if you do this you may end up compiling more |
73 |
> stuff locally. |
74 |
|
75 |
Or you just replace them (c++, cc, gcc, and g++) with a wrapper to make sure |
76 |
it invokes the full compiler name. That's what they recommend here: |
77 |
https://wiki.gentoo.org/wiki/Raspberry_Pi_Cross_building |
78 |
|
79 |
-- |
80 |
Fernando Rodriguez |