[distcc] How split c++ passes for MacOS X CrossCompiler

Markus Biermaier mbier at office-m.at
Tue Dec 2 07:18:16 GMT 2003


Hello,

I use a (slow) MacOS X (10.1) computer and a (fast) LinuxPC as volunteer 
computer.
It works perfectly for "c" makes. E.g. "readline-4.3" builds without 
probs.
Trying to compile c++ sources I always get errors from the volunteer 
computer regarding
missing / incorrect INCLUDES.

I tried to splitt the compile passes with a script.
My configuration:

[Target == ControllingComputer ] > cc -v
Reading specs from /usr/libexec/gcc/darwin/ppc/2.95.2/specs
Apple Computer, Inc. version gcc-932.1, based on gcc version 2.95.2 
19991024 (release)

[Host] > /usr/local/powerpc-apple-darwin/bin/powerpc-apple-darwin-gcc -v
Using built-in specs.
Konfiguriert mit: ../gcc/configure --target=powerpc-apple-darwin 
--prefix=/usr/local/powerpc-apple-darwin -v
Thread model: single
gcc-Version 3.3.2

Below is the "heart" of the Pearl-script.

#==================================================
# --- DARWIN
Command ("/usr/bin/c++ -v -E $NoOutParameters $Name.cpp > $Name.ii\n");
#Command ("/usr/bin/cc -v -E $NoOutParameters $Name.cpp > $Name.ii\n");

# --- LINUX
Command ("powerpc-apple-darwin-gcc -v $NoOutParameters -S $Name.ii -o 
$Name.s\n");
#Command ("powerpc-apple-darwin-gcc -v                  -S $Name.ii -o 
$Name.s\n");
#Command ("powerpc-apple-darwin-c++ -v $NoOutParameters -S $Name.ii -o 
$Name.s\n");
#Command ("powerpc-apple-darwin-g++ -v $NoOutParameters -S $Name.ii -o 
$Name.s\n");
#Command ("powerpc-apple-darwin-cpp -v $NoOutParameters -S $Name.ii -o 
$Name.s\n");

# --- DARWIN
#Command ("cc -c $Name.s -o $Name.o\n");
#Command ("/usr/bin/cc -c $Name.s $TheParameters \n");
Command ("/usr/bin/cc -v $Name.s $TheParameters \n");
#==================================================

This is the partly output of a compilation.
#--------------------------------------------------
Cmd: ### powerpc-apple-darwin-gcc -v -c -pipe 
-I/usr/local/mysql-3.23.27-beta-apple-darwin1.2-powerpc/include 
-fno-exceptions -Wall -W -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT 
-DQT_SHARED -I/Developer/qt-mac-free-3.2.2/mkspecs/macx-g++ -I. 
-I../../include 
-I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers 
-I/System/Library/Frameworks/AGL.framework/Versions/A/Headers 
-I.moc/release-shared-mt/  -S aclock.ii -o aclock.s
distcc[439] distcc 2.11.2 powerpc-apple-darwin5.5; built 11/25/03 
14:46:47
distcc[439] safeguard level=0
distcc[439] compiler name is "powerpc-apple-darwin-gcc"
distcc[439] setting 
PATH=/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/Users/markus:.:/Users/
markus/useful
distcc[439] scanning arguments: powerpc-apple-darwin-gcc -v -c -pipe 
-I/usr/local/mysql-3.23.27-beta-apple-darwin1.2-powerpc/include 
-fno-exceptions -Wall -W -O2 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT 
-DQT_SHARED -I/Developer/qt-mac-free-3.2.2/mkspecs/macx-g++ -I. 
-I../../include 
-I/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers 
-I/System/Library/Frameworks/AGL.framework/Versions/A/Headers 
-I.moc/release-shared-mt/ -S aclock.ii -o aclock.s
distcc[439] found input file "aclock.ii"
distcc[439] found object/output file "aclock.s"
distcc[439] compile from aclock.ii to aclock.s
distcc[439] read hosts from environment
distcc[439] found tcp token "linuxorange.mboffice"
distcc[439] got cpu lock on linuxorange.mboffice slot 0 as fd4
distcc[439] input is already preprocessed
distcc[439] result: powerpc-apple-darwin-gcc -v -c -pipe -fno-exceptions 
-Wall -W -O2 -S aclock.ii -o aclock.s
distcc[439] exec on linuxorange.mboffice: powerpc-apple-darwin-gcc -v -c 
-pipe -fno-exceptions -Wall -W -O2 -S aclock.ii -o aclock.s
distcc[439] note state 2, file "aclock.ii", host "linuxorange.mboffice"
distcc[439] nonblocking connect to 192.168.1.115:3632
distcc[439] select for write on fd5
distcc[439] client got connection to linuxorange.mboffice port 3632 on 
fd5
distcc[439] send DIST00000001
distcc[439] send ARGC0000000c
distcc[439] send ARGV00000018
distcc[439] send ARGV00000002
distcc[439] send ARGV00000002
distcc[439] send ARGV00000005
distcc[439] send ARGV0000000f
distcc[439] send ARGV00000005
distcc[439] send ARGV00000002
distcc[439] send ARGV00000003
distcc[439] send ARGV00000002
distcc[439] send ARGV00000009
distcc[439] send ARGV00000002
distcc[439] send ARGV00000008
distcc[439] note state 4, file "(NULL)", host "(NULL)"
distcc[439] send 487088 byte file aclock.ii with token DOTI
distcc[439] send DOTI00076eb0
distcc[439] client finished sending request to server
distcc[439] note state 5, file "(NULL)", host "linuxorange.mboffice"
distcc[439] got DONE00000001
distcc[439] got response header
distcc[439] note state 6, file "(NULL)", host "(NULL)"
distcc[439] got STAT00000100
distcc[439] got SERR0000a443
Using built-in specs.
Konfiguriert mit: ../gcc/configure --target=powerpc-apple-darwin 
--prefix=/usr/local/powerpc-apple-darwin -v
Thread model: single
gcc-Version 3.3.2
  /usr/local/powerpc-apple-darwin/lib/gcc-lib/powerpc-apple-
darwin/3.3.2/cc1plus -fpreprocessed /tmp/distccd_2eb137a3.ii -fPIC 
-quiet -dumpbase distccd_2eb137a3.ii -auxbase-strip 
/tmp/distccd_2ea937a3.o -O2 -Wall -W -version -fno-exceptions -o 
/tmp/distccd_2ea937a3.o
GNU C++ version 3.3.2 (powerpc-apple-darwin)
         compiled by GNU C version 3.3.2.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64426
In file included from /usr/include/gcc/darwin/2.95.2/g++/cstddef:6,
                  from 
/usr/include/gcc/darwin/2.95.2/g++/std/bastring.h:35,
                  from /usr/include/gcc/darwin/2.95.2/g++/string:6,
                  from ../../include/qstring.h:56,
                  from ../../include/qwindowdefs.h:44,
                  from ../../include/qwidget.h:42,
                  from aclock.h:14,
                  from aclock.cpp:11:
/usr/include/stddef.h:74: error: Syntaxfehler before `wchar_t'
/usr/include/stddef.h:76: error: Syntaxfehler before `;' token
In file included from /usr/include/ctype.h:68,
                  from /usr/include/gcc/darwin/2.95.2/g++/cctype:6,
                  from 
/usr/include/gcc/darwin/2.95.2/g++/std/straits.h:105,
                  from 
/usr/include/gcc/darwin/2.95.2/g++/std/bastring.h:36,
                  from /usr/include/gcc/darwin/2.95.2/g++/string:6,
                  from ../../include/qstring.h:56,
                  from ../../include/qwindowdefs.h:44,
                  from ../../include/qwidget.h:42,
                  from aclock.h:14,
                  from aclock.cpp:11:
/usr/include/runetype.h:81: error: 'rune_t' is used as a type, but is not
    defined as a type.
...
          lots of errors.
#--------------------------------------------------

What am I doing wrong?
Thanks for any help.

#--------------------------------------------------
P.S:
Times for building "readline-4.3"

Local:
real    1m6.498s
user    0m48.330s
sys     0m8.440s

Distccd (tcp) -j 5, no "localhost"
real    0m39.759s
user    0m21.170s
sys     0m11.380s
#--------------------------------------------------

Markus

----------------------------------------------------------------------
M. Biermaier
Wiesengasse 15
3011  Untertullnerbach                    E-Mail: mbier AT office-m.at
Austria / Europe                      Web Site: http://www.office-m.at




More information about the distcc mailing list