Cross compiling x86_64 on an i686 system on Ubuntu with distcc

I am trying to set up a small prefabricated cluster at home using distcc. There are two x64 systems and 1 i686 system. All systems are running Ubuntu 10.10 and are updated. The system initiating the build is x64. Distcc works fine between the two x64 systems, but all build tasks sent to the i686 system fail.

Still:

  • I installed the multilib package for g ++ on this system. I can cross compile on x64 locally usingg++ -m64
  • Changed the link in /usr/lib/distcc/g++to indicate to the script that explicity sets the parameter -m64.

Any suggestions?

+5
source share
1 answer

Attempting to retry this attempt again:

GCC has a page describing the i386 and x86-64 parameters . The flag -m64indicates the generation of 64-bit code, but you will also want to specify the type of CPU with -march=i686or -march=k8or similar to use the correct set of commands.

Since distcc sends GCC command line flags, you should try adding them to the distcc command, which is run locally, and skip the remote script to set the flags.

If you test the architecture flags on your local x64 machine without distcc, just g ++, then it should provide you with the correct binaries when using distcc.

+5
source

All Articles